lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250417091532.26520-3-phasta@kernel.org>
Date: Thu, 17 Apr 2025 11:15:33 +0200
From: Philipp Stanner <phasta@...nel.org>
To: Arnd Bergmann <arnd@...db.de>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Philipp Stanner <phasta@...nel.org>,
	Desnes Nunes <desnesn@...hat.com>
Cc: linux-kernel@...r.kernel.org
Subject: [PATCH 2/2] misc: cardreader: Return -EBUSY if regions are busy

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@...nel.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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ