can: kvaser_pciefd: Disable interrupts in probe error path
authorJimmy Assarsson <extja@kvaser.com>
Tue, 16 May 2023 13:43:18 +0000 (15:43 +0200)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Wed, 17 May 2023 07:02:40 +0000 (09:02 +0200)
Disable interrupts in error path of probe function.

Fixes: 26ad340e582d ("can: kvaser_pciefd: Add driver for Kvaser PCIEcan devices")
Cc: stable@vger.kernel.org
Signed-off-by: Jimmy Assarsson <extja@kvaser.com>
Link: https://lore.kernel.org/r/20230516134318.104279-7-extja@kvaser.com
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/kvaser_pciefd.c

index 4fafb7658349912a90615f3b8618b3df33d249e9..be189edb256ceb13590b170e3294ef72264a5092 100644 (file)
@@ -1861,6 +1861,8 @@ static int kvaser_pciefd_probe(struct pci_dev *pdev,
        return 0;
 
 err_free_irq:
+       /* Disable PCI interrupts */
+       iowrite32(0, pcie->reg_base + KVASER_PCIEFD_IEN_REG);
        free_irq(pcie->pci->irq, pcie);
 
 err_teardown_can_ctrls: