Commit 379efed1 authored by Jeff Garzik's avatar Jeff Garzik Committed by Adrian Bunk

[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: default avatarJeff Garzik <jeff@garzik.org>
Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
parent ec2b07d4
...@@ -1001,6 +1001,10 @@ static int fs_open(struct atm_vcc *atm_vcc) ...@@ -1001,6 +1001,10 @@ static int fs_open(struct atm_vcc *atm_vcc)
r = ROUND_UP; r = ROUND_UP;
} }
error = make_rate (pcr, r, &tmc0, NULL); error = make_rate (pcr, r, &tmc0, NULL);
if (error) {
kfree(tc);
return error;
}
} }
fs_dprintk (FS_DEBUG_OPEN, "pcr = %d.\n", pcr); fs_dprintk (FS_DEBUG_OPEN, "pcr = %d.\n", pcr);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment