]> nv-tegra.nvidia Code Review - linux-2.6.git/commitdiff
parisc: set_time() catch errors
authorRoel Kluin <roel.kluin@gmail.com>
Wed, 3 Dec 2008 04:16:04 +0000 (04:16 +0000)
committerKyle McMartin <kyle@mcmartin.ca>
Mon, 5 Jan 2009 18:15:25 +0000 (18:15 +0000)
set_rtc_time returns negative on error, ret should be signed to catch those

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Reviewed-by: Grant Grundler <grundler@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
drivers/rtc/rtc-parisc.c

index 346d633655e79d1841fe61df46c11a6ae8b39207..c6bfa6fe1a2a289dddc0748ebd660df195087724 100644 (file)
@@ -34,7 +34,8 @@ static int parisc_get_time(struct device *dev, struct rtc_time *tm)
 static int parisc_set_time(struct device *dev, struct rtc_time *tm)
 {
        struct parisc_rtc *p = dev_get_drvdata(dev);
 static int parisc_set_time(struct device *dev, struct rtc_time *tm)
 {
        struct parisc_rtc *p = dev_get_drvdata(dev);
-       unsigned long flags, ret;
+       unsigned long flags;
+       int ret;
 
        spin_lock_irqsave(&p->lock, flags);
        ret = set_rtc_time(tm);
 
        spin_lock_irqsave(&p->lock, flags);
        ret = set_rtc_time(tm);