lan78xx: Correctly indicate invalid OTP
authorPhil Elwell <phil@raspberrypi.org>
Tue, 28 Nov 2017 12:02:37 +0000 (12:02 +0000)
committerRaspbian kernel package updater <root@raspbian.org>
Sat, 31 Mar 2018 14:57:25 +0000 (15:57 +0100)
commit20e93aa9299ec683265b5a3f738daa1aeabd2b96
tree28157164856109e63fd58473abec775ff7ea60e8
parent113ff3a3fc4da01dd17030d38171e5ed11b07ea8
lan78xx: Correctly indicate invalid OTP

lan78xx_read_otp tries to return -EINVAL in the event of invalid OTP
content, but the value gets overwritten before it is returned and the
read goes ahead anyway. Make the read conditional as it should be
and preserve the error code.

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
drivers/net/usb/lan78xx.c