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>
Thu, 15 Feb 2018 17:41:09 +0000 (17:41 +0000)
commitdec81e8cbe11e429b273cac2ff82c82318848e1f
treef53fa0fbfe3ce045453601fb737d24a3cc2248e3
parentc452a1a795dcafca3502ec602d5e15bf373f3a69
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