diff options
author | Jeff Garzik <jeff@garzik.org> | 2007-07-17 02:32:21 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-07-17 16:18:01 -0400 |
commit | b1734d2388cc45ecdec58615e35955d0d402f938 (patch) | |
tree | 22218bc7fb0428ac6566a056a7f76edf92b44cdd /drivers/atm/ambassador.c | |
parent | ea8b4db97aa41a66c05daa4055a1974692ccd52d (diff) |
drivers/atm/ambassador: kill uninit'd var warning, and fix bug
An uninitialized variable warning illuminated an area where indeed the
variable was being used without initialization. Unfortunately, after
verifying all such paths were fixed, the warning still appears. So we
follow the initialization practice of other variables in this function.
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/atm/ambassador.c')
-rw-r--r-- | drivers/atm/ambassador.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/atm/ambassador.c b/drivers/atm/ambassador.c index 59651abfa4f8..b34b3829f6a9 100644 --- a/drivers/atm/ambassador.c +++ b/drivers/atm/ambassador.c | |||
@@ -1040,7 +1040,7 @@ static int amb_open (struct atm_vcc * atm_vcc) | |||
1040 | struct atm_qos * qos; | 1040 | struct atm_qos * qos; |
1041 | struct atm_trafprm * txtp; | 1041 | struct atm_trafprm * txtp; |
1042 | struct atm_trafprm * rxtp; | 1042 | struct atm_trafprm * rxtp; |
1043 | u16 tx_rate_bits; | 1043 | u16 tx_rate_bits = -1; // hush gcc |
1044 | u16 tx_vc_bits = -1; // hush gcc | 1044 | u16 tx_vc_bits = -1; // hush gcc |
1045 | u16 tx_frame_bits = -1; // hush gcc | 1045 | u16 tx_frame_bits = -1; // hush gcc |
1046 | 1046 | ||
@@ -1096,6 +1096,8 @@ static int amb_open (struct atm_vcc * atm_vcc) | |||
1096 | r = round_up; | 1096 | r = round_up; |
1097 | } | 1097 | } |
1098 | error = make_rate (pcr, r, &tx_rate_bits, NULL); | 1098 | error = make_rate (pcr, r, &tx_rate_bits, NULL); |
1099 | if (error) | ||
1100 | return error; | ||
1099 | tx_vc_bits = TX_UBR_CAPPED; | 1101 | tx_vc_bits = TX_UBR_CAPPED; |
1100 | tx_frame_bits = TX_FRAME_CAPPED; | 1102 | tx_frame_bits = TX_FRAME_CAPPED; |
1101 | } | 1103 | } |