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

drivers/rtc: Replace PTR_RET with PTR_ERR_OR_ZERO

PTR_RET is now deprecated. Use PTR_ERR_OR_ZERO instead.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

authored by

Sachin Kamat and committed by
Rusty Russell
dac30a98 6b4f2b56

+5 -5
+1 -1
drivers/rtc/rtc-da9052.c
··· 250 250 251 251 rtc->rtc = devm_rtc_device_register(&pdev->dev, pdev->name, 252 252 &da9052_rtc_ops, THIS_MODULE); 253 - return PTR_RET(rtc->rtc); 253 + return PTR_ERR_OR_ZERO(rtc->rtc); 254 254 } 255 255 256 256 static struct platform_driver da9052_rtc_driver = {
+1 -1
drivers/rtc/rtc-isl12022.c
··· 268 268 isl12022->rtc = devm_rtc_device_register(&client->dev, 269 269 isl12022_driver.driver.name, 270 270 &isl12022_rtc_ops, THIS_MODULE); 271 - return PTR_RET(isl12022->rtc); 271 + return PTR_ERR_OR_ZERO(isl12022->rtc); 272 272 } 273 273 274 274 static const struct i2c_device_id isl12022_id[] = {
+1 -1
drivers/rtc/rtc-m48t35.c
··· 175 175 176 176 priv->rtc = devm_rtc_device_register(&pdev->dev, "m48t35", 177 177 &m48t35_ops, THIS_MODULE); 178 - return PTR_RET(priv->rtc); 178 + return PTR_ERR_OR_ZERO(priv->rtc); 179 179 } 180 180 181 181 static struct platform_driver m48t35_platform_driver = {
+1 -1
drivers/rtc/rtc-pcf8563.c
··· 264 264 pcf8563_driver.driver.name, 265 265 &pcf8563_rtc_ops, THIS_MODULE); 266 266 267 - return PTR_RET(pcf8563->rtc); 267 + return PTR_ERR_OR_ZERO(pcf8563->rtc); 268 268 } 269 269 270 270 static const struct i2c_device_id pcf8563_id[] = {
+1 -1
drivers/rtc/rtc-pcf8583.c
··· 285 285 pcf8583_driver.driver.name, 286 286 &pcf8583_rtc_ops, THIS_MODULE); 287 287 288 - return PTR_RET(pcf8583->rtc); 288 + return PTR_ERR_OR_ZERO(pcf8583->rtc); 289 289 } 290 290 291 291 static const struct i2c_device_id pcf8583_id[] = {