mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-21 18:11:39 +00:00
can: kvaser_pciefd: Call request_irq() before enabling interrupts
commit84762d8da8
upstream. Make sure the interrupt handler is registered before enabling interrupts. Fixes:26ad340e58
("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-4-extja@kvaser.com Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
24bdfcb099
commit
50bdf44a1b
1 changed files with 5 additions and 5 deletions
|
@ -1825,6 +1825,11 @@ static int kvaser_pciefd_probe(struct pci_dev *pdev,
|
|||
if (err)
|
||||
goto err_teardown_can_ctrls;
|
||||
|
||||
err = request_irq(pcie->pci->irq, kvaser_pciefd_irq_handler,
|
||||
IRQF_SHARED, KVASER_PCIEFD_DRV_NAME, pcie);
|
||||
if (err)
|
||||
goto err_teardown_can_ctrls;
|
||||
|
||||
iowrite32(KVASER_PCIEFD_SRB_IRQ_DPD0 | KVASER_PCIEFD_SRB_IRQ_DPD1,
|
||||
pcie->reg_base + KVASER_PCIEFD_SRB_IRQ_REG);
|
||||
|
||||
|
@ -1845,11 +1850,6 @@ static int kvaser_pciefd_probe(struct pci_dev *pdev,
|
|||
iowrite32(KVASER_PCIEFD_SRB_CMD_RDB1,
|
||||
pcie->reg_base + KVASER_PCIEFD_SRB_CMD_REG);
|
||||
|
||||
err = request_irq(pcie->pci->irq, kvaser_pciefd_irq_handler,
|
||||
IRQF_SHARED, KVASER_PCIEFD_DRV_NAME, pcie);
|
||||
if (err)
|
||||
goto err_teardown_can_ctrls;
|
||||
|
||||
err = kvaser_pciefd_reg_candev(pcie);
|
||||
if (err)
|
||||
goto err_free_irq;
|
||||
|
|
Loading…
Reference in a new issue