Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 663bab6f authored by Jeff Garzik's avatar Jeff Garzik Committed by David S. Miller
Browse files

[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 avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b45eccdb
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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);
		}