diff options
Diffstat (limited to 'drivers/rtc/rtc-mc13xxx.c')
-rw-r--r-- | drivers/rtc/rtc-mc13xxx.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/rtc/rtc-mc13xxx.c b/drivers/rtc/rtc-mc13xxx.c index c5ac03793e79..a1a278bc340d 100644 --- a/drivers/rtc/rtc-mc13xxx.c +++ b/drivers/rtc/rtc-mc13xxx.c | |||
@@ -349,11 +349,15 @@ static int __devinit mc13xxx_rtc_probe(struct platform_device *pdev) | |||
349 | if (ret) | 349 | if (ret) |
350 | goto err_alarm_irq_request; | 350 | goto err_alarm_irq_request; |
351 | 351 | ||
352 | mc13xxx_unlock(mc13xxx); | ||
353 | |||
352 | priv->rtc = rtc_device_register(pdev->name, | 354 | priv->rtc = rtc_device_register(pdev->name, |
353 | &pdev->dev, &mc13xxx_rtc_ops, THIS_MODULE); | 355 | &pdev->dev, &mc13xxx_rtc_ops, THIS_MODULE); |
354 | if (IS_ERR(priv->rtc)) { | 356 | if (IS_ERR(priv->rtc)) { |
355 | ret = PTR_ERR(priv->rtc); | 357 | ret = PTR_ERR(priv->rtc); |
356 | 358 | ||
359 | mc13xxx_lock(mc13xxx); | ||
360 | |||
357 | mc13xxx_irq_free(mc13xxx, MC13XXX_IRQ_TODA, priv); | 361 | mc13xxx_irq_free(mc13xxx, MC13XXX_IRQ_TODA, priv); |
358 | err_alarm_irq_request: | 362 | err_alarm_irq_request: |
359 | 363 | ||
@@ -365,12 +369,12 @@ err_reset_irq_status: | |||
365 | mc13xxx_irq_free(mc13xxx, MC13XXX_IRQ_RTCRST, priv); | 369 | mc13xxx_irq_free(mc13xxx, MC13XXX_IRQ_RTCRST, priv); |
366 | err_reset_irq_request: | 370 | err_reset_irq_request: |
367 | 371 | ||
372 | mc13xxx_unlock(mc13xxx); | ||
373 | |||
368 | platform_set_drvdata(pdev, NULL); | 374 | platform_set_drvdata(pdev, NULL); |
369 | kfree(priv); | 375 | kfree(priv); |
370 | } | 376 | } |
371 | 377 | ||
372 | mc13xxx_unlock(mc13xxx); | ||
373 | |||
374 | return ret; | 378 | return ret; |
375 | } | 379 | } |
376 | 380 | ||