From: Philipp Stanner <phasta@kernel.org>
To: Arnd Bergmann <arnd@arndb.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Philipp Stanner <phasta@kernel.org>,
Desnes Nunes <desnesn@redhat.com>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] misc: cardreader: Return -EBUSY if regions are busy
Date: Thu, 17 Apr 2025 11:15:33 +0200 [thread overview]
Message-ID: <20250417091532.26520-3-phasta@kernel.org> (raw)
In-Reply-To: <20250417091532.26520-2-phasta@kernel.org>
cardreader returns -ENOMEM if a PCI region is currently in use
("requested") by another driver. The proper return code for this is
-EBUSY.
Replace -ENOMEM with -EBUSY.
Signed-off-by: Philipp Stanner <phasta@kernel.org>
---
drivers/misc/cardreader/alcor_pci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/misc/cardreader/alcor_pci.c b/drivers/misc/cardreader/alcor_pci.c
index 43f08b0db742..8e7ea2c9142d 100644
--- a/drivers/misc/cardreader/alcor_pci.c
+++ b/drivers/misc/cardreader/alcor_pci.c
@@ -124,7 +124,7 @@ static int alcor_pci_probe(struct pci_dev *pdev,
ret = pcim_request_all_regions(pdev, DRV_NAME_ALCOR_PCI);
if (ret) {
dev_err(&pdev->dev, "Cannot request region\n");
- ret = -ENOMEM;
+ ret = -EBUSY;
goto error_free_ida;
}
--
2.48.1
prev parent reply other threads:[~2025-04-17 9:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-17 9:15 [PATCH 1/2] misc: cardreader: Use non-hybrid PCI devres API Philipp Stanner
2025-04-17 9:15 ` Philipp Stanner [this message]
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=20250417091532.26520-3-phasta@kernel.org \
--to=phasta@kernel.org \
--cc=arnd@arndb.de \
--cc=desnesn@redhat.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox