Commit dac30a98 authored by Sachin Kamat's avatar Sachin Kamat Committed by Rusty Russell

drivers/rtc: Replace PTR_RET with PTR_ERR_OR_ZERO

PTR_RET is now deprecated. Use PTR_ERR_OR_ZERO instead.
Signed-off-by: default avatarSachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
parent 6b4f2b56
......@@ -250,7 +250,7 @@ static int da9052_rtc_probe(struct platform_device *pdev)
rtc->rtc = devm_rtc_device_register(&pdev->dev, pdev->name,
&da9052_rtc_ops, THIS_MODULE);
return PTR_RET(rtc->rtc);
return PTR_ERR_OR_ZERO(rtc->rtc);
}
static struct platform_driver da9052_rtc_driver = {
......
......@@ -268,7 +268,7 @@ static int isl12022_probe(struct i2c_client *client,
isl12022->rtc = devm_rtc_device_register(&client->dev,
isl12022_driver.driver.name,
&isl12022_rtc_ops, THIS_MODULE);
return PTR_RET(isl12022->rtc);
return PTR_ERR_OR_ZERO(isl12022->rtc);
}
static const struct i2c_device_id isl12022_id[] = {
......
......@@ -175,7 +175,7 @@ static int m48t35_probe(struct platform_device *pdev)
priv->rtc = devm_rtc_device_register(&pdev->dev, "m48t35",
&m48t35_ops, THIS_MODULE);
return PTR_RET(priv->rtc);
return PTR_ERR_OR_ZERO(priv->rtc);
}
static struct platform_driver m48t35_platform_driver = {
......
......@@ -264,7 +264,7 @@ static int pcf8563_probe(struct i2c_client *client,
pcf8563_driver.driver.name,
&pcf8563_rtc_ops, THIS_MODULE);
return PTR_RET(pcf8563->rtc);
return PTR_ERR_OR_ZERO(pcf8563->rtc);
}
static const struct i2c_device_id pcf8563_id[] = {
......
......@@ -285,7 +285,7 @@ static int pcf8583_probe(struct i2c_client *client,
pcf8583_driver.driver.name,
&pcf8583_rtc_ops, THIS_MODULE);
return PTR_RET(pcf8583->rtc);
return PTR_ERR_OR_ZERO(pcf8583->rtc);
}
static const struct i2c_device_id pcf8583_id[] = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment