aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/atheros
diff options
context:
space:
mode:
authorTobias Regnery <tobias.regnery@gmail.com>2016-09-13 12:06:57 +0200
committerDavid S. Miller <davem@davemloft.net>2016-09-15 20:15:26 -0400
commit0ca4e20ba3de1a1077ee36df22176c2055497923 (patch)
treeb3882e8c7897df77cea9217947963c7e297424d0 /drivers/net/ethernet/atheros
parentcxgb4vf: don't offload Rx checksums for IPv6 fragments (diff)
downloadlinux-dev-0ca4e20ba3de1a1077ee36df22176c2055497923.tar.xz
linux-dev-0ca4e20ba3de1a1077ee36df22176c2055497923.zip
alx: fix error handling in __alx_open
In commit 9ee7b683ea63 we moved the enablement of msi interrupts earlier in alx_init_intr. If there is an error in alx_alloc_rings, __alx_open returns with an error but msi (or msi-x) interrupts stays enabled. Add a new error label to disable msi (or msi-x) interrupts. Fixes: 9ee7b683ea63 ("alx: refactor msi enablement and disablement") Signed-off-by: Tobias Regnery <tobias.regnery@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/atheros')
-rw-r--r--drivers/net/ethernet/atheros/alx/main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/atheros/alx/main.c b/drivers/net/ethernet/atheros/alx/main.c
index 9887cee434dd..c0f84b73574d 100644
--- a/drivers/net/ethernet/atheros/alx/main.c
+++ b/drivers/net/ethernet/atheros/alx/main.c
@@ -1028,7 +1028,7 @@ static int __alx_open(struct alx_priv *alx, bool resume)
err = alx_alloc_rings(alx);
if (err)
- return err;
+ goto out_disable_adv_intr;
alx_configure(alx);
@@ -1049,6 +1049,8 @@ static int __alx_open(struct alx_priv *alx, bool resume)
out_free_rings:
alx_free_rings(alx);
+out_disable_adv_intr:
+ alx_disable_advanced_intr(alx);
return err;
}