]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/rtc/rtc-bfin.c
drivers/rtc: correct an error test
[linux-2.6-omap-h63xx.git] / drivers / rtc / rtc-bfin.c
index 34439ce3967e1844c552091fb72a0555b904644d..aafd3e6ebb0dfa92725f63798de226d5bf20ac72 100644 (file)
@@ -390,7 +390,7 @@ static int __devinit bfin_rtc_probe(struct platform_device *pdev)
 
        /* Register our RTC with the RTC framework */
        rtc->rtc_dev = rtc_device_register(pdev->name, dev, &bfin_rtc_ops, THIS_MODULE);
-       if (unlikely(IS_ERR(rtc))) {
+       if (unlikely(IS_ERR(rtc->rtc_dev))) {
                ret = PTR_ERR(rtc->rtc_dev);
                goto err_irq;
        }