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] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210721150216.64823-2-andriy.shevchenko@linux.intel.com>
Date:   Wed, 21 Jul 2021 18:02:16 +0300
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        linux-kernel@...r.kernel.org
Cc:     Sudip Mukherjee <sudipm.mukherjee@...il.com>,
        gregkh@...uxfoundation.org
Subject: [PATCH v1 2/2] parport: serial: Retrieve IRQ vector with help of special getter

pci_irq_vector() may be used to retrieve IRQ vector for a PCI device.
Use it instead of direct access.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
---
 drivers/parport/parport_serial.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/parport/parport_serial.c b/drivers/parport/parport_serial.c
index 14e2427676f0..9f5d784cd95d 100644
--- a/drivers/parport/parport_serial.c
+++ b/drivers/parport/parport_serial.c
@@ -606,7 +606,9 @@ static int parport_register(struct pci_dev *dev, const struct pci_device_id *id)
                                         "hi" as an offset (see SYBA
                                         def.) */
 		/* TODO: test if sharing interrupts works */
-		irq = dev->irq;
+		irq = pci_irq_vector(dev, 0);
+		if (irq < 0)
+			return irq;
 		if (irq == 0)
 			irq = PARPORT_IRQ_NONE;
 		if (irq == PARPORT_IRQ_NONE) {
-- 
2.30.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ