Skip to content

Commit

Permalink
parisc: set_time() catch errors
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Roel Kluin authored and Kyle McMartin committed Jan 5, 2009
1 parent d2e6675 commit 022b769
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/rtc/rtc-parisc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
unsigned long flags, ret;
unsigned long flags;
int ret;

spin_lock_irqsave(&p->lock, flags);
ret = set_rtc_time(tm);
Expand Down

0 comments on commit 022b769

Please sign in to comment.