diff options
Diffstat (limited to 'drivers/rtc/rtc-twl4030.c')
-rw-r--r-- | drivers/rtc/rtc-twl4030.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/rtc/rtc-twl4030.c b/drivers/rtc/rtc-twl4030.c index 01d8da9afdc8..8ce5f74ee45b 100644 --- a/drivers/rtc/rtc-twl4030.c +++ b/drivers/rtc/rtc-twl4030.c | |||
@@ -19,6 +19,7 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
22 | #include <linux/errno.h> | ||
22 | #include <linux/init.h> | 23 | #include <linux/init.h> |
23 | #include <linux/module.h> | 24 | #include <linux/module.h> |
24 | #include <linux/types.h> | 25 | #include <linux/types.h> |
@@ -415,8 +416,8 @@ static int __devinit twl4030_rtc_probe(struct platform_device *pdev) | |||
415 | int irq = platform_get_irq(pdev, 0); | 416 | int irq = platform_get_irq(pdev, 0); |
416 | u8 rd_reg; | 417 | u8 rd_reg; |
417 | 418 | ||
418 | if (irq < 0) | 419 | if (irq <= 0) |
419 | return irq; | 420 | return -EINVAL; |
420 | 421 | ||
421 | rtc = rtc_device_register(pdev->name, | 422 | rtc = rtc_device_register(pdev->name, |
422 | &pdev->dev, &twl4030_rtc_ops, THIS_MODULE); | 423 | &pdev->dev, &twl4030_rtc_ops, THIS_MODULE); |