Skip to content

Commit 663bab6

Browse files
Jeff GarzikDavid S. Miller
authored andcommitted
[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>
1 parent b45eccd commit 663bab6

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎drivers/atm/firestream.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1002,6 +1002,10 @@ static int fs_open(struct atm_vcc *atm_vcc)
10021002
r = ROUND_UP;
10031003
}
10041004
error = make_rate (pcr, r, &tmc0, NULL);
1005+
if (error) {
1006+
kfree(tc);
1007+
return error;
1008+
}
10051009
}
10061010
fs_dprintk (FS_DEBUG_OPEN, "pcr = %d.\n", pcr);
10071011
}

0 commit comments

Comments
 (0)