Skip to content

Commit ede7193

Browse files
LinoSanfilippo333davem330
authored andcommitted
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>
1 parent eb6a248 commit ede7193

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • drivers/net/ethernet/marvell

‎drivers/net/ethernet/marvell/sky2.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4804,14 +4804,14 @@ static int __devinit sky2_test_msi(struct sky2_hw *hw)
48044804

48054805
init_waitqueue_head(&hw->msi_wait);
48064806

4807-
sky2_write32(hw, B0_IMSK, Y2_IS_IRQ_SW);
4808-
48094807
err = request_irq(pdev->irq, sky2_test_intr, 0, DRV_NAME, hw);
48104808
if (err) {
48114809
dev_err(&pdev->dev, "cannot assign irq %d\n", pdev->irq);
48124810
return err;
48134811
}
48144812

4813+
sky2_write32(hw, B0_IMSK, Y2_IS_IRQ_SW);
4814+
48154815
sky2_write8(hw, B0_CTST, CS_ST_SW_IRQ);
48164816
sky2_read8(hw, B0_CTST);
48174817

0 commit comments

Comments
 (0)