]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: lan9303: Fix error return code in lan9303_check_device()
authorWei Yongjun <weiyongjun1@huawei.com>
Thu, 4 Jan 2018 07:30:28 +0000 (07:30 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 5 Jan 2018 16:24:54 +0000 (11:24 -0500)
commitc26d053547e0abad62e81851117f084d35beaaea
treec19a7d37adab5c5d0198882027be918c20c1a5b8
parent1da1eb7423a71cb482b847e82b2ad131d616b422
net: dsa: lan9303: Fix error return code in lan9303_check_device()

Fix to return error code -ENODEV from the chip not found error handling
case instead of 0(ret have been overwritten to 0 by lan9303_read()), as
done elsewhere in this function.

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Reviewed-by: Egil Hjelmeland <privat@egil-hjelmeland.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/lan9303-core.c