All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jimmy Assarsson <extja@kvaser.com>
To: linux-can@vger.kernel.org
Cc: Jimmy Assarsson <jimmyassarsson@gmail.com>,
	stable@vger.kernel.org, Jimmy Assarsson <extja@kvaser.com>
Subject: [PATCH 6/6] can: kvaser_pciefd: Disable interrupts in probe error path
Date: Tue, 16 May 2023 15:43:18 +0200	[thread overview]
Message-ID: <20230516134318.104279-7-extja@kvaser.com> (raw)
In-Reply-To: <20230516134318.104279-1-extja@kvaser.com>

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>
---
 drivers/net/can/kvaser_pciefd.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/can/kvaser_pciefd.c b/drivers/net/can/kvaser_pciefd.c
index 4fafb7658349..be189edb256c 100644
--- a/drivers/net/can/kvaser_pciefd.c
+++ b/drivers/net/can/kvaser_pciefd.c
@@ -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:
-- 
2.40.0


  parent reply	other threads:[~2023-05-16 13:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-16 13:43 [PATCH 0/6] can: kvaser_pciefd: Bug fixes Jimmy Assarsson
2023-05-16 13:43 ` [PATCH 1/6] can: kvaser_pciefd: Set CAN_STATE_STOPPED in kvaser_pciefd_stop() Jimmy Assarsson
2023-05-16 13:43 ` [PATCH 2/6] can: kvaser_pciefd: Clear listen-only bit if not explicitly requested Jimmy Assarsson
2023-05-16 13:43 ` [PATCH 3/6] can: kvaser_pciefd: Call request_irq() before enabling interrupts Jimmy Assarsson
2023-05-16 13:43 ` [PATCH 4/6] can: kvaser_pciefd: Empty SRB buffer in probe Jimmy Assarsson
2023-05-16 13:43 ` [PATCH 5/6] can: kvaser_pciefd: Do not send EFLUSH command on TFD interrupt Jimmy Assarsson
2023-05-16 13:43 ` Jimmy Assarsson [this message]
2023-05-17  7:03 ` [PATCH 0/6] can: kvaser_pciefd: Bug fixes Marc Kleine-Budde

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230516134318.104279-7-extja@kvaser.com \
    --to=extja@kvaser.com \
    --cc=jimmyassarsson@gmail.com \
    --cc=linux-can@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.