Skip to content

Commit

Permalink
drivers/rtc/rtc-pcf2123.c: fix error return code in pcf2123_probe()
Browse files Browse the repository at this point in the history
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 <yongjun_wei@trendmicro.com.cn>
Cc: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Wei Yongjun authored and torvalds committed Apr 30, 2013
1 parent 01ee577 commit 3562371
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/rtc/rtc-pcf2123.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 3562371

Please sign in to comment.