Skip to content

Commit 3562371

Browse files
Wei Yongjuntorvalds
authored andcommitted
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: Wei Yongjun <[email protected]> Cc: Jingoo Han <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 01ee577 commit 3562371

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/rtc/rtc-pcf2123.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,7 @@ static int pcf2123_probe(struct spi_device *spi)
266266

267267
if (!(rxbuf[0] & 0x20)) {
268268
dev_err(&spi->dev, "chip not found\n");
269+
ret = -ENODEV;
269270
goto kfree_exit;
270271
}
271272

0 commit comments

Comments
 (0)