Skip to content

Commit

Permalink
sky2: fix missing register reset on error path in sky2_test_msi()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Lino Sanfilippo authored and David S. Miller committed Apr 3, 2012
1 parent eb6a248 commit ede7193
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/ethernet/marvell/sky2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit ede7193

Please sign in to comment.