提交 35623715 编写于 作者: W Wei Yongjun 提交者: Linus Torvalds

drivers/rtc/rtc-pcf2123.c: fix error return code in pcf2123_probe()

Fix to return -ENODEV in the chip not found error handling
case instead of 0, as done elsewhere in this function.
Signed-off-by: NWei Yongjun <yongjun_wei@trendmicro.com.cn>
Cc: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 01ee577a
......@@ -266,6 +266,7 @@ static int pcf2123_probe(struct spi_device *spi)
if (!(rxbuf[0] & 0x20)) {
dev_err(&spi->dev, "chip not found\n");
ret = -ENODEV;
goto kfree_exit;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册