提交 a31e795a 编写于 作者: W Wei Yongjun 提交者: David S. Miller

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: NWei Yongjun <weiyongjun1@huawei.com>
Reviewed-by: NEgil Hjelmeland <privat@egil-hjelmeland.no>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 7892ea23
......@@ -865,7 +865,7 @@ static int lan9303_check_device(struct lan9303 *chip)
if ((reg >> 16) != LAN9303_CHIP_ID) {
dev_err(chip->dev, "expecting LAN9303 chip, but found: %X\n",
reg >> 16);
return ret;
return -ENODEV;
}
/* The default state of the LAN9303 device is to forward packets between
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
反馈
建议
客服 返回
顶部