From: Jeff Garzik <[EMAIL PROTECTED]>
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 <[EMAIL PROTECTED]>
Cc: chas williams <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
---
drivers/atm/firestream.c | 4 ++++
1 files changed, 4 insertions(+)
diff -puN drivers/atm/firestream.c~atm-firestream-handle-thrown-error
drivers/atm/firestream.c
--- a/drivers/atm/firestream.c~atm-firestream-handle-thrown-error
+++ a/drivers/atm/firestream.c
@@ -1002,6 +1002,10 @@ static int fs_open(struct atm_vcc *atm_v
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);
}
_
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html