summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/intel/iwlegacy
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2016-03-18 03:23:46 +0100
committerKalle Valo <kvalo@codeaurora.org>2016-04-07 18:37:42 +0200
commitfb9693f04544068e6176051ce5b96e4574730107 (patch)
treed4c1f156e1a1508d510df8b290aab8b78d1636f6 /drivers/net/wireless/intel/iwlegacy
parentbrcmfmac: Delete unnecessary variable initialisation (diff)
downloadlinux-fb9693f04544068e6176051ce5b96e4574730107.tar.xz
linux-fb9693f04544068e6176051ce5b96e4574730107.zip
iwlegacy: Return directly if allocation fails in il_eeprom_init()
Also remove an unused label. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Acked-by: Stanislaw Gruszka <sgruszka@redhat.com> [Rewrote commit message] Signed-off-by: Julian Calaby <julian.calaby@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/intel/iwlegacy')
-rw-r--r--drivers/net/wireless/intel/iwlegacy/common.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/net/wireless/intel/iwlegacy/common.c b/drivers/net/wireless/intel/iwlegacy/common.c
index eb5cb603bc52..c3afaf71066e 100644
--- a/drivers/net/wireless/intel/iwlegacy/common.c
+++ b/drivers/net/wireless/intel/iwlegacy/common.c
@@ -723,10 +723,9 @@ il_eeprom_init(struct il_priv *il)
sz = il->cfg->eeprom_size;
D_EEPROM("NVM size = %d\n", sz);
il->eeprom = kzalloc(sz, GFP_KERNEL);
- if (!il->eeprom) {
- ret = -ENOMEM;
- goto alloc_err;
- }
+ if (!il->eeprom)
+ return -ENOMEM;
+
e = (__le16 *) il->eeprom;
il->ops->apm_init(il);
@@ -778,7 +777,6 @@ err:
il_eeprom_free(il);
/* Reset chip to save power until we load uCode during "up". */
il_apm_stop(il);
-alloc_err:
return ret;
}
EXPORT_SYMBOL(il_eeprom_init);