aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/rtc/rtc-ds1307.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c
index 47a93c022d91..eb99ee4fa0f5 100644
--- a/drivers/rtc/rtc-ds1307.c
+++ b/drivers/rtc/rtc-ds1307.c
@@ -896,8 +896,7 @@ read_rtc:
896 return 0; 896 return 0;
897 897
898exit_irq: 898exit_irq:
899 if (ds1307->rtc) 899 rtc_device_unregister(ds1307->rtc);
900 rtc_device_unregister(ds1307->rtc);
901exit_free: 900exit_free:
902 kfree(ds1307); 901 kfree(ds1307);
903 return err; 902 return err;