Skip to content

Commit

Permalink
alx: fix error handling in __alx_open
Browse files Browse the repository at this point in the history
In commit 9ee7b68 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: 9ee7b68 ("alx: refactor msi enablement and disablement")
Signed-off-by: Tobias Regnery <tobias.regnery@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Tobias Regnery authored and David S. Miller committed Sep 16, 2016
1 parent 5400e54 commit 0ca4e20
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/net/ethernet/atheros/alx/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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;
}

Expand Down

0 comments on commit 0ca4e20

Please sign in to comment.