rtc/m48t59: kfree(NULL) is OK
Wan ZongShun [Wed, 11 Aug 2010 01:02:09 +0000 (18:02 -0700)]
Signed-off-by: Wan ZongShun <mcuos.com@gmail.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Paul Gortmaker <p_gortmaker@yahoo.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

drivers/rtc/rtc-m48t59.c

index be8359f..0b66455 100644 (file)
@@ -506,7 +506,6 @@ out:
                free_irq(m48t59->irq, &pdev->dev);
        if (m48t59->ioaddr)
                iounmap(m48t59->ioaddr);
-       if (m48t59)
                kfree(m48t59);
        return ret;
 }