Skip to content

Commit 84762d8

Browse files
Jimmy Assarssonmarckleinebudde
authored andcommitted
can: kvaser_pciefd: Call request_irq() before enabling interrupts
Make sure the interrupt handler is registered before enabling interrupts. Fixes: 26ad340 ("can: kvaser_pciefd: Add driver for Kvaser PCIEcan devices") Cc: [email protected] Signed-off-by: Jimmy Assarsson <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
1 parent bf7ac55 commit 84762d8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

drivers/net/can/kvaser_pciefd.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1827,6 +1827,11 @@ static int kvaser_pciefd_probe(struct pci_dev *pdev,
18271827
if (err)
18281828
goto err_teardown_can_ctrls;
18291829

1830+
err = request_irq(pcie->pci->irq, kvaser_pciefd_irq_handler,
1831+
IRQF_SHARED, KVASER_PCIEFD_DRV_NAME, pcie);
1832+
if (err)
1833+
goto err_teardown_can_ctrls;
1834+
18301835
iowrite32(KVASER_PCIEFD_SRB_IRQ_DPD0 | KVASER_PCIEFD_SRB_IRQ_DPD1,
18311836
pcie->reg_base + KVASER_PCIEFD_SRB_IRQ_REG);
18321837

@@ -1847,11 +1852,6 @@ static int kvaser_pciefd_probe(struct pci_dev *pdev,
18471852
iowrite32(KVASER_PCIEFD_SRB_CMD_RDB1,
18481853
pcie->reg_base + KVASER_PCIEFD_SRB_CMD_REG);
18491854

1850-
err = request_irq(pcie->pci->irq, kvaser_pciefd_irq_handler,
1851-
IRQF_SHARED, KVASER_PCIEFD_DRV_NAME, pcie);
1852-
if (err)
1853-
goto err_teardown_can_ctrls;
1854-
18551855
err = kvaser_pciefd_reg_candev(pcie);
18561856
if (err)
18571857
goto err_free_irq;

0 commit comments

Comments
 (0)