diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/rtc/rtc-rp5c01.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/rtc/rtc-rp5c01.c b/drivers/rtc/rtc-rp5c01.c index 873c689f01c3..89d073679267 100644 --- a/drivers/rtc/rtc-rp5c01.c +++ b/drivers/rtc/rtc-rp5c01.c | |||
@@ -251,21 +251,15 @@ static int __init rp5c01_rtc_probe(struct platform_device *dev) | |||
251 | 251 | ||
252 | rtc = devm_rtc_device_register(&dev->dev, "rtc-rp5c01", &rp5c01_rtc_ops, | 252 | rtc = devm_rtc_device_register(&dev->dev, "rtc-rp5c01", &rp5c01_rtc_ops, |
253 | THIS_MODULE); | 253 | THIS_MODULE); |
254 | if (IS_ERR(rtc)) { | 254 | if (IS_ERR(rtc)) |
255 | error = PTR_ERR(rtc); | 255 | return PTR_ERR(rtc); |
256 | goto out; | ||
257 | } | ||
258 | priv->rtc = rtc; | 256 | priv->rtc = rtc; |
259 | 257 | ||
260 | error = sysfs_create_bin_file(&dev->dev.kobj, &priv->nvram_attr); | 258 | error = sysfs_create_bin_file(&dev->dev.kobj, &priv->nvram_attr); |
261 | if (error) | 259 | if (error) |
262 | goto out; | 260 | return error; |
263 | 261 | ||
264 | return 0; | 262 | return 0; |
265 | |||
266 | out: | ||
267 | platform_set_drvdata(dev, NULL); | ||
268 | return error; | ||
269 | } | 263 | } |
270 | 264 | ||
271 | static int __exit rp5c01_rtc_remove(struct platform_device *dev) | 265 | static int __exit rp5c01_rtc_remove(struct platform_device *dev) |