]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Jan 2022 14:09:47 +0000 (15:09 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Jan 2022 14:09:47 +0000 (15:09 +0100)
added patches:
lib82596-fix-irq-check-in-sni_82596_probe.patch

queue-4.4/lib82596-fix-irq-check-in-sni_82596_probe.patch [new file with mode: 0644]
queue-4.4/series

diff --git a/queue-4.4/lib82596-fix-irq-check-in-sni_82596_probe.patch b/queue-4.4/lib82596-fix-irq-check-in-sni_82596_probe.patch
new file mode 100644 (file)
index 0000000..07e75a9
--- /dev/null
@@ -0,0 +1,40 @@
+From 99218cbf81bf21355a3de61cd46a706d36e900e6 Mon Sep 17 00:00:00 2001
+From: Miaoqian Lin <linmq006@gmail.com>
+Date: Fri, 14 Jan 2022 06:57:24 +0000
+Subject: lib82596: Fix IRQ check in sni_82596_probe
+
+From: Miaoqian Lin <linmq006@gmail.com>
+
+commit 99218cbf81bf21355a3de61cd46a706d36e900e6 upstream.
+
+platform_get_irq() returns negative error number instead 0 on failure.
+And the doc of platform_get_irq() provides a usage example:
+
+    int irq = platform_get_irq(pdev, 0);
+    if (irq < 0)
+        return irq;
+
+Fix the check of return value to catch errors correctly.
+
+Fixes: 115978859272 ("i825xx: Move the Intel 82586/82593/82596 based drivers")
+Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/ethernet/i825xx/sni_82596.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/net/ethernet/i825xx/sni_82596.c
++++ b/drivers/net/ethernet/i825xx/sni_82596.c
+@@ -122,9 +122,10 @@ static int sni_82596_probe(struct platfo
+       netdevice->dev_addr[5] = readb(eth_addr + 0x06);
+       iounmap(eth_addr);
+-      if (!netdevice->irq) {
++      if (netdevice->irq < 0) {
+               printk(KERN_ERR "%s: IRQ not found for i82596 at 0x%lx\n",
+                       __FILE__, netdevice->base_addr);
++              retval = netdevice->irq;
+               goto probe_failed;
+       }
index 53d41382bedbee7b7577a32f222dd585dd3a9723..a0872bd45f24380e9aa09cfc2fad0661b6531308 100644 (file)
@@ -111,3 +111,4 @@ dmaengine-at_xdmac-fix-lld-view-setting.patch
 dmaengine-at_xdmac-fix-at_xdmac_lld-struct-definition.patch
 net_sched-restore-mpu-xxx-handling.patch
 bcmgenet-add-wol-irq-check.patch
+lib82596-fix-irq-check-in-sni_82596_probe.patch