diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-10-20 19:50:50 -0700 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-10-21 19:55:24 -0700 |
commit | 663bab6fd097c18ae0c7a7fd1b4a44558b998cdb (patch) | |
tree | 1b5b590d393f394396a24a1cdfdc73f0fef82f73 /drivers | |
parent | b45eccdb51c102e3c5ff9eaecc36200ab2eb09c0 (diff) |
[ATM] firestream: handle thrown error
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/atm/firestream.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/atm/firestream.c b/drivers/atm/firestream.c index 40ab9b65fae..697ad82f663 100644 --- a/drivers/atm/firestream.c +++ b/drivers/atm/firestream.c @@ -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); } |