summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/marvell/sky2.c
diff options
context:
space:
mode:
authorLino Sanfilippo <LinoSanfilippo@gmx.de>2012-03-30 11:36:16 +0400
committerDavid S. Miller <davem@davemloft.net>2012-04-04 01:06:38 +0400
commitede7193d4fdca98178240500d8684dbc139ca26f (patch)
tree7e8e7123e40bfaa10a6eb0d43513675ccac10ef4 /drivers/net/ethernet/marvell/sky2.c
parenteb6a24816b247c0be6b2e97e68933072874bbe54 (diff)
downloadlinux-ede7193d4fdca98178240500d8684dbc139ca26f.tar.xz
sky2: fix missing register reset on error path in sky2_test_msi()
In sky2_test_msi() the temporarily set SW IRQ in B0 register is not reset in case that request_irq() fails. With this patch we only set the interrupt mask if request_irq() was successful. Signed-off-by: Lino Sanfilippo <LinoSanfilippo@gmx.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/marvell/sky2.c')
-rw-r--r--drivers/net/ethernet/marvell/sky2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/marvell/sky2.c b/drivers/net/ethernet/marvell/sky2.c
index 423a1a2a702e..20a59322c79d 100644
--- a/drivers/net/ethernet/marvell/sky2.c
+++ b/drivers/net/ethernet/marvell/sky2.c
@@ -4804,14 +4804,14 @@ static int __devinit sky2_test_msi(struct sky2_hw *hw)
init_waitqueue_head(&hw->msi_wait);
- sky2_write32(hw, B0_IMSK, Y2_IS_IRQ_SW);
-
err = request_irq(pdev->irq, sky2_test_intr, 0, DRV_NAME, hw);
if (err) {
dev_err(&pdev->dev, "cannot assign irq %d\n", pdev->irq);
return err;
}
+ sky2_write32(hw, B0_IMSK, Y2_IS_IRQ_SW);
+
sky2_write8(hw, B0_CTST, CS_ST_SW_IRQ);
sky2_read8(hw, B0_CTST);