]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
niu: fix missing checks of niu_pci_eeprom_read
authorKangjie Lu <kjlu@umn.edu>
Tue, 25 Dec 2018 07:56:14 +0000 (01:56 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Feb 2019 09:09:02 +0000 (10:09 +0100)
commit3896d308f19cba0d4c8028f33467a1b7a6652eff
tree3b0a8505ee37429ae56a96ac1a3dd68d3ddaa6de
parente4a2ebdb56d9b03274731151fe2f4a378b1bbc51
niu: fix missing checks of niu_pci_eeprom_read

[ Upstream commit 26fd962bde0b15e54234fe762d86bc0349df1de4 ]

niu_pci_eeprom_read() may fail, so we should check its return value
before using the read data.

Signed-off-by: Kangjie Lu <kjlu@umn.edu>
Acked-by: Shannon Nelson <shannon.lee.nelson@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/sun/niu.c