diff options
author | Jeff Garzik <jeff@garzik.org> | 2007-02-21 01:42:39 +0100 |
---|---|---|
committer | Adrian Bunk <bunk@stusta.de> | 2007-02-21 01:42:39 +0100 |
commit | 379efed186cb110913caa2014bf6cbc396e1fefb (patch) | |
tree | 5b58d11a878d77aa0cf6911bf73300468fca9e64 /drivers | |
parent | ec2b07d409fcf3d83312b7fd431d1e8798224682 (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: Adrian Bunk <bunk@stusta.de>
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 7f7ec288824d..01eebd1ab80d 100644 --- a/drivers/atm/firestream.c +++ b/drivers/atm/firestream.c @@ -1001,6 +1001,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); } |