aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/rtc/rtc-parisc.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/rtc/rtc-parisc.c b/drivers/rtc/rtc-parisc.c
index a2ca07ad42cb..c29e91814c9a 100644
--- a/drivers/rtc/rtc-parisc.c
+++ b/drivers/rtc/rtc-parisc.c
@@ -25,11 +25,7 @@ static int parisc_get_time(struct device *dev, struct rtc_time *tm)
25 25
26static int parisc_set_time(struct device *dev, struct rtc_time *tm) 26static int parisc_set_time(struct device *dev, struct rtc_time *tm)
27{ 27{
28 int ret; 28 if (set_rtc_time(tm) < 0)
29
30 ret = set_rtc_time(tm);
31
32 if (ret < 0)
33 return -EOPNOTSUPP; 29 return -EOPNOTSUPP;
34 30
35 return 0; 31 return 0;
@@ -46,10 +42,8 @@ static int __init parisc_rtc_probe(struct platform_device *dev)
46 42
47 p = rtc_device_register("rtc-parisc", &dev->dev, &parisc_rtc_ops, 43 p = rtc_device_register("rtc-parisc", &dev->dev, &parisc_rtc_ops,
48 THIS_MODULE); 44 THIS_MODULE);
49 if (IS_ERR(p)) { 45 if (IS_ERR(p))
50 int err = PTR_ERR(p); 46 return PTR_ERR(p);
51 return err;
52 }
53 47
54 platform_set_drvdata(dev, p); 48 platform_set_drvdata(dev, p);
55 49