]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/rtc/rtc-dev.c
ALSA: ASoC: Fix double free and memory leak in many codec drivers
[linux-2.6-omap-h63xx.git] / drivers / rtc / rtc-dev.c
index 0a870b7e5c323f5a5411f6c494545d33c023465c..856cc1af40df85efe53805822c62886af0754143 100644 (file)
@@ -221,7 +221,7 @@ static long rtc_dev_ioctl(struct file *file,
 
        err = mutex_lock_interruptible(&rtc->ops_lock);
        if (err)
-               return -EBUSY;
+               return err;
 
        /* check that the calling task has appropriate permissions
         * for certain ioctls. doing this check here is useful
@@ -432,6 +432,8 @@ static int rtc_dev_release(struct inode *inode, struct file *file)
 #ifdef CONFIG_RTC_INTF_DEV_UIE_EMUL
        clear_uie(rtc);
 #endif
+       rtc_irq_set_state(rtc, NULL, 0);
+
        if (rtc->ops->release)
                rtc->ops->release(rtc->dev.parent);