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

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

Use of PTR_RET() simplifies the code.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Roman Fietze <roman.fietze@telemotive.de>
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
17cc54b2 11f54d05

+2 -4
+2 -4
drivers/rtc/rtc-isl12022.c
··· 16 16 #include <linux/rtc.h> 17 17 #include <linux/slab.h> 18 18 #include <linux/module.h> 19 + #include <linux/err.h> 19 20 20 21 #define DRV_VERSION "0.1" 21 22 ··· 268 267 isl12022->rtc = devm_rtc_device_register(&client->dev, 269 268 isl12022_driver.driver.name, 270 269 &isl12022_rtc_ops, THIS_MODULE); 271 - if (IS_ERR(isl12022->rtc)) 272 - return PTR_ERR(isl12022->rtc); 273 - 274 - return 0; 270 + return PTR_RET(isl12022->rtc); 275 271 } 276 272 277 273 static const struct i2c_device_id isl12022_id[] = {