diff options
Diffstat (limited to 'drivers/rtc/rtc-bfin.c')
-rw-r--r-- | drivers/rtc/rtc-bfin.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/rtc/rtc-bfin.c b/drivers/rtc/rtc-bfin.c index 0c53f452849d..fe4bdb06a55a 100644 --- a/drivers/rtc/rtc-bfin.c +++ b/drivers/rtc/rtc-bfin.c | |||
@@ -346,7 +346,7 @@ static int bfin_rtc_probe(struct platform_device *pdev) | |||
346 | { | 346 | { |
347 | struct bfin_rtc *rtc; | 347 | struct bfin_rtc *rtc; |
348 | struct device *dev = &pdev->dev; | 348 | struct device *dev = &pdev->dev; |
349 | int ret = 0; | 349 | int ret; |
350 | unsigned long timeout = jiffies + HZ; | 350 | unsigned long timeout = jiffies + HZ; |
351 | 351 | ||
352 | dev_dbg_stamp(dev); | 352 | dev_dbg_stamp(dev); |
@@ -361,16 +361,17 @@ static int bfin_rtc_probe(struct platform_device *pdev) | |||
361 | /* Register our RTC with the RTC framework */ | 361 | /* Register our RTC with the RTC framework */ |
362 | rtc->rtc_dev = devm_rtc_device_register(dev, pdev->name, &bfin_rtc_ops, | 362 | rtc->rtc_dev = devm_rtc_device_register(dev, pdev->name, &bfin_rtc_ops, |
363 | THIS_MODULE); | 363 | THIS_MODULE); |
364 | if (unlikely(IS_ERR(rtc->rtc_dev))) { | 364 | if (unlikely(IS_ERR(rtc->rtc_dev))) |
365 | ret = PTR_ERR(rtc->rtc_dev); | 365 | return PTR_ERR(rtc->rtc_dev); |
366 | goto err; | ||
367 | } | ||
368 | 366 | ||
369 | /* Grab the IRQ and init the hardware */ | 367 | /* Grab the IRQ and init the hardware */ |
370 | ret = devm_request_irq(dev, IRQ_RTC, bfin_rtc_interrupt, 0, | 368 | ret = devm_request_irq(dev, IRQ_RTC, bfin_rtc_interrupt, 0, |
371 | pdev->name, dev); | 369 | pdev->name, dev); |
372 | if (unlikely(ret)) | 370 | if (unlikely(ret)) |
373 | goto err; | 371 | dev_err(&pdev->dev, |
372 | "unable to request IRQ; alarm won't work, " | ||
373 | "and writes will be delayed\n"); | ||
374 | |||
374 | /* sometimes the bootloader touched things, but the write complete was not | 375 | /* sometimes the bootloader touched things, but the write complete was not |
375 | * enabled, so let's just do a quick timeout here since the IRQ will not fire ... | 376 | * enabled, so let's just do a quick timeout here since the IRQ will not fire ... |
376 | */ | 377 | */ |
@@ -381,9 +382,6 @@ static int bfin_rtc_probe(struct platform_device *pdev) | |||
381 | bfin_write_RTC_SWCNT(0); | 382 | bfin_write_RTC_SWCNT(0); |
382 | 383 | ||
383 | return 0; | 384 | return 0; |
384 | |||
385 | err: | ||
386 | return ret; | ||
387 | } | 385 | } |
388 | 386 | ||
389 | static int bfin_rtc_remove(struct platform_device *pdev) | 387 | static int bfin_rtc_remove(struct platform_device *pdev) |