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

drivers/rtc/rtc-pcf8563.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
23f809ee 8ff7b7d9

+2 -4
+2 -4
drivers/rtc/rtc-pcf8563.c
··· 20 20 #include <linux/slab.h> 21 21 #include <linux/module.h> 22 22 #include <linux/of.h> 23 + #include <linux/err.h> 23 24 24 25 #define DRV_VERSION "0.4.3" 25 26 ··· 264 263 pcf8563_driver.driver.name, 265 264 &pcf8563_rtc_ops, THIS_MODULE); 266 265 267 - if (IS_ERR(pcf8563->rtc)) 268 - return PTR_ERR(pcf8563->rtc); 269 - 270 - return 0; 266 + return PTR_RET(pcf8563->rtc); 271 267 } 272 268 273 269 static const struct i2c_device_id pcf8563_id[] = {