From: Paul Jakma <paul@jakma.org>
To: davem@davemloft.net
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
netdev@vger.kernel.org, stable <stable@vger.kernel.org>,
Kangjie Lu <kjlu@umn.edu>
Subject: [PATCH] NIU: fix missing revert of return and fix the driver
Date: Tue, 20 Jul 2021 21:10:37 +0100 (BST) [thread overview]
Message-ID: <70d84870-2d7a-77b2-175b-ef1ff3cb6c38@jakma.org> (raw)
The revert of commit 26fd962 missed out on reverting an incorrect change
to a return value. The niu_pci_vpd_scan_props(..) == 1 case appears to
be a normal path - treating it as an error and return -EINVAL was
breaking VPD_SCAN and causing the driver to fail to load.
Fix it, so my Neptune card works again.
Cc: Kangjie Lu <kjlu@umn.edu>
Cc: Shannon Nelson <shannon.lee.nelson@gmail.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Fixes: 7930742d ('Revert "niu: fix missing checks of niu_pci_eeprom_read"')
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Paul Jakma <paul@jakma.org>
---
--- e6e337708c22f80824b82d4af645f20715730ad0/drivers/net/ethernet/sun/niu.c 2021-07-20 20:51:52.054770659 +0100
+++ fix/drivers/net/ethernet/sun/niu.c 2021-07-20 20:49:02.194870695 +0100
@@ -8192,7 +8192,7 @@
if (err < 0)
return err;
if (err == 1)
- return -EINVAL;
+ return 0;
}
return 0;
}
--
Paul Jakma | paul@jakma.org | @pjakma | Key ID: 0xD86BF79464A2FF6A
Fortune:
How sharper than a serpent's tooth is a sister's "See?"
-- Linus Van Pelt
next reply other threads:[~2021-07-20 20:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-20 20:10 Paul Jakma [this message]
2021-07-21 15:47 ` [PATCH] NIU: fix missing revert of return and fix the driver David Miller
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=70d84870-2d7a-77b2-175b-ef1ff3cb6c38@jakma.org \
--to=paul@jakma.org \
--cc=davem@davemloft.net \
--cc=gregkh@linuxfoundation.org \
--cc=kjlu@umn.edu \
--cc=netdev@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).