diff options
author | Stanislav Yakovlev <stas.yakovlev@gmail.com> | 2012-11-14 22:07:47 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-11-16 14:29:06 -0500 |
commit | 9c033bed936629155129a2b3e7493838fe76b8b5 (patch) | |
tree | cf57c0dce0e2ed821fdf5909b6ff6e44acb32403 /drivers/net/wireless/ipw2x00 | |
parent | b87e2c482510d56563873827783046a8eece5829 (diff) |
net/wireless: ipw2x00: remove unreachable code
Remove unnecessary if statements because libipw_set_geo always
returns success. Also change function's return value from int
to void.
Signed-off-by: Stanislav Yakovlev <stas.yakovlev@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ipw2x00')
-rw-r--r-- | drivers/net/wireless/ipw2x00/ipw2100.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/ipw2x00/ipw2200.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/ipw2x00/libipw.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ipw2x00/libipw_geo.c | 3 |
4 files changed, 4 insertions, 11 deletions
diff --git a/drivers/net/wireless/ipw2x00/ipw2100.c b/drivers/net/wireless/ipw2x00/ipw2100.c index 29b8fa1adefd..46938bc9886d 100644 --- a/drivers/net/wireless/ipw2x00/ipw2100.c +++ b/drivers/net/wireless/ipw2x00/ipw2100.c | |||
@@ -1788,10 +1788,7 @@ static int ipw2100_up(struct ipw2100_priv *priv, int deferred) | |||
1788 | } | 1788 | } |
1789 | 1789 | ||
1790 | /* Initialize the geo */ | 1790 | /* Initialize the geo */ |
1791 | if (libipw_set_geo(priv->ieee, &ipw_geos[0])) { | 1791 | libipw_set_geo(priv->ieee, &ipw_geos[0]); |
1792 | printk(KERN_WARNING DRV_NAME "Could not set geo\n"); | ||
1793 | return 0; | ||
1794 | } | ||
1795 | priv->ieee->freq_band = LIBIPW_24GHZ_BAND; | 1792 | priv->ieee->freq_band = LIBIPW_24GHZ_BAND; |
1796 | 1793 | ||
1797 | lock = LOCK_NONE; | 1794 | lock = LOCK_NONE; |
diff --git a/drivers/net/wireless/ipw2x00/ipw2200.c b/drivers/net/wireless/ipw2x00/ipw2200.c index 768bf612533e..fea96b58ab89 100644 --- a/drivers/net/wireless/ipw2x00/ipw2200.c +++ b/drivers/net/wireless/ipw2x00/ipw2200.c | |||
@@ -11322,10 +11322,7 @@ static int ipw_up(struct ipw_priv *priv) | |||
11322 | priv->eeprom[EEPROM_COUNTRY_CODE + 2]); | 11322 | priv->eeprom[EEPROM_COUNTRY_CODE + 2]); |
11323 | j = 0; | 11323 | j = 0; |
11324 | } | 11324 | } |
11325 | if (libipw_set_geo(priv->ieee, &ipw_geos[j])) { | 11325 | libipw_set_geo(priv->ieee, &ipw_geos[j]); |
11326 | IPW_WARNING("Could not set geography."); | ||
11327 | return 0; | ||
11328 | } | ||
11329 | 11326 | ||
11330 | if (priv->status & STATUS_RF_KILL_SW) { | 11327 | if (priv->status & STATUS_RF_KILL_SW) { |
11331 | IPW_WARNING("Radio disabled by module parameter.\n"); | 11328 | IPW_WARNING("Radio disabled by module parameter.\n"); |
diff --git a/drivers/net/wireless/ipw2x00/libipw.h b/drivers/net/wireless/ipw2x00/libipw.h index 0b22fb421735..6eede52ad8c0 100644 --- a/drivers/net/wireless/ipw2x00/libipw.h +++ b/drivers/net/wireless/ipw2x00/libipw.h | |||
@@ -978,7 +978,7 @@ extern void libipw_network_reset(struct libipw_network *network); | |||
978 | /* libipw_geo.c */ | 978 | /* libipw_geo.c */ |
979 | extern const struct libipw_geo *libipw_get_geo(struct libipw_device | 979 | extern const struct libipw_geo *libipw_get_geo(struct libipw_device |
980 | *ieee); | 980 | *ieee); |
981 | extern int libipw_set_geo(struct libipw_device *ieee, | 981 | extern void libipw_set_geo(struct libipw_device *ieee, |
982 | const struct libipw_geo *geo); | 982 | const struct libipw_geo *geo); |
983 | 983 | ||
984 | extern int libipw_is_valid_channel(struct libipw_device *ieee, | 984 | extern int libipw_is_valid_channel(struct libipw_device *ieee, |
diff --git a/drivers/net/wireless/ipw2x00/libipw_geo.c b/drivers/net/wireless/ipw2x00/libipw_geo.c index c9fe3c99cb00..218f2a32de21 100644 --- a/drivers/net/wireless/ipw2x00/libipw_geo.c +++ b/drivers/net/wireless/ipw2x00/libipw_geo.c | |||
@@ -132,7 +132,7 @@ u8 libipw_freq_to_channel(struct libipw_device * ieee, u32 freq) | |||
132 | return 0; | 132 | return 0; |
133 | } | 133 | } |
134 | 134 | ||
135 | int libipw_set_geo(struct libipw_device *ieee, | 135 | void libipw_set_geo(struct libipw_device *ieee, |
136 | const struct libipw_geo *geo) | 136 | const struct libipw_geo *geo) |
137 | { | 137 | { |
138 | memcpy(ieee->geo.name, geo->name, 3); | 138 | memcpy(ieee->geo.name, geo->name, 3); |
@@ -143,7 +143,6 @@ int libipw_set_geo(struct libipw_device *ieee, | |||
143 | sizeof(struct libipw_channel)); | 143 | sizeof(struct libipw_channel)); |
144 | memcpy(ieee->geo.a, geo->a, ieee->geo.a_channels * | 144 | memcpy(ieee->geo.a, geo->a, ieee->geo.a_channels * |
145 | sizeof(struct libipw_channel)); | 145 | sizeof(struct libipw_channel)); |
146 | return 0; | ||
147 | } | 146 | } |
148 | 147 | ||
149 | const struct libipw_geo *libipw_get_geo(struct libipw_device *ieee) | 148 | const struct libipw_geo *libipw_get_geo(struct libipw_device *ieee) |