diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-10-21 04:50:50 +0200 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-10-22 04:55:24 +0200 |
commit | 663bab6fd097c18ae0c7a7fd1b4a44558b998cdb (patch) | |
tree | 1b5b590d393f394396a24a1cdfdc73f0fef82f73 | |
parent | [ATM]: No need to return void (diff) | |
download | linux-663bab6fd097c18ae0c7a7fd1b4a44558b998cdb.tar.xz linux-663bab6fd097c18ae0c7a7fd1b4a44558b998cdb.zip |
[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>
-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 40ab9b65fae9..697ad82f6634 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); } |