]> www.infradead.org Git - users/jedix/linux-maple.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>
Tue, 12 Feb 2019 18:46:08 +0000 (19:46 +0100)
commitba87bdade1366d650e00ff7b1524dba8bd4d71f5
tree71314b9003e02a3c7fd4d4e8a4d6d5fc56c0ce89
parente8f13f32f436e3fae2b43a433ec5c677e0e2f5f9
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