Commit 60b19b61 authored by Wei Yongjun's avatar Wei Yongjun Committed by Greg Kroah-Hartman

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

commit 35623715 upstream.

Fix to return -ENODEV in the chip not found error handling
case instead of 0, as done elsewhere in this function.
Signed-off-by: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Cc: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: default avatarJonghwan Choi <jhbird.choi@samsung.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 56b02ed3
...@@ -265,6 +265,7 @@ static int pcf2123_probe(struct spi_device *spi) ...@@ -265,6 +265,7 @@ static int pcf2123_probe(struct spi_device *spi)
if (!(rxbuf[0] & 0x20)) { if (!(rxbuf[0] & 0x20)) {
dev_err(&spi->dev, "chip not found\n"); dev_err(&spi->dev, "chip not found\n");
ret = -ENODEV;
goto kfree_exit; goto kfree_exit;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment