Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drivers/rtc/rtc-pcf8583.c: use PTR_RET()

Use of PTR_RET() simplifies the code.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Sachin Kamat and committed by
Linus Torvalds
ee605e0b 23f809ee

+2 -4
+2 -4
drivers/rtc/rtc-pcf8583.c
··· 17 17 #include <linux/slab.h> 18 18 #include <linux/rtc.h> 19 19 #include <linux/init.h> 20 + #include <linux/err.h> 20 21 #include <linux/errno.h> 21 22 #include <linux/bcd.h> 22 23 ··· 285 284 pcf8583_driver.driver.name, 286 285 &pcf8583_rtc_ops, THIS_MODULE); 287 286 288 - if (IS_ERR(pcf8583->rtc)) 289 - return PTR_ERR(pcf8583->rtc); 290 - 291 - return 0; 287 + return PTR_RET(pcf8583->rtc); 292 288 } 293 289 294 290 static const struct i2c_device_id pcf8583_id[] = {