Skip to content

Commit

Permalink
[ATM] firestream: handle thrown error
Browse files Browse the repository at this point in the history
gcc emits the following warning:

drivers/atm/firestream.c: In function ‘fs_open’:
drivers/atm/firestream.c:870: warning: ‘tmc0’ may be used uninitialized in this function

This indicates a real bug.  We should check make_rate() return value for
potential errors.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jeff Garzik authored and David S. Miller committed Oct 22, 2006
1 parent b45eccd commit 663bab6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/atm/firestream.c
Original file line number Diff line number Diff line change
Expand Up @@ -1002,6 +1002,10 @@ static int fs_open(struct atm_vcc *atm_vcc)
r = ROUND_UP;
}
error = make_rate (pcr, r, &tmc0, NULL);
if (error) {
kfree(tc);
return error;
}
}
fs_dprintk (FS_DEBUG_OPEN, "pcr = %d.\n", pcr);
}
Expand Down

0 comments on commit 663bab6

Please sign in to comment.