diff options
-rw-r--r-- | drivers/rtc/interface.c | 10 | ||||
-rw-r--r-- | drivers/rtc/rtc-dev.c | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/drivers/rtc/interface.c b/drivers/rtc/interface.c index d397fa5f3a91..7af60b98d8a4 100644 --- a/drivers/rtc/interface.c +++ b/drivers/rtc/interface.c | |||
@@ -20,7 +20,7 @@ int rtc_read_time(struct rtc_device *rtc, struct rtc_time *tm) | |||
20 | 20 | ||
21 | err = mutex_lock_interruptible(&rtc->ops_lock); | 21 | err = mutex_lock_interruptible(&rtc->ops_lock); |
22 | if (err) | 22 | if (err) |
23 | return -EBUSY; | 23 | return err; |
24 | 24 | ||
25 | if (!rtc->ops) | 25 | if (!rtc->ops) |
26 | err = -ENODEV; | 26 | err = -ENODEV; |
@@ -46,7 +46,7 @@ int rtc_set_time(struct rtc_device *rtc, struct rtc_time *tm) | |||
46 | 46 | ||
47 | err = mutex_lock_interruptible(&rtc->ops_lock); | 47 | err = mutex_lock_interruptible(&rtc->ops_lock); |
48 | if (err) | 48 | if (err) |
49 | return -EBUSY; | 49 | return err; |
50 | 50 | ||
51 | if (!rtc->ops) | 51 | if (!rtc->ops) |
52 | err = -ENODEV; | 52 | err = -ENODEV; |
@@ -66,7 +66,7 @@ int rtc_set_mmss(struct rtc_device *rtc, unsigned long secs) | |||
66 | 66 | ||
67 | err = mutex_lock_interruptible(&rtc->ops_lock); | 67 | err = mutex_lock_interruptible(&rtc->ops_lock); |
68 | if (err) | 68 | if (err) |
69 | return -EBUSY; | 69 | return err; |
70 | 70 | ||
71 | if (!rtc->ops) | 71 | if (!rtc->ops) |
72 | err = -ENODEV; | 72 | err = -ENODEV; |
@@ -106,7 +106,7 @@ static int rtc_read_alarm_internal(struct rtc_device *rtc, struct rtc_wkalrm *al | |||
106 | 106 | ||
107 | err = mutex_lock_interruptible(&rtc->ops_lock); | 107 | err = mutex_lock_interruptible(&rtc->ops_lock); |
108 | if (err) | 108 | if (err) |
109 | return -EBUSY; | 109 | return err; |
110 | 110 | ||
111 | if (rtc->ops == NULL) | 111 | if (rtc->ops == NULL) |
112 | err = -ENODEV; | 112 | err = -ENODEV; |
@@ -293,7 +293,7 @@ int rtc_set_alarm(struct rtc_device *rtc, struct rtc_wkalrm *alarm) | |||
293 | 293 | ||
294 | err = mutex_lock_interruptible(&rtc->ops_lock); | 294 | err = mutex_lock_interruptible(&rtc->ops_lock); |
295 | if (err) | 295 | if (err) |
296 | return -EBUSY; | 296 | return err; |
297 | 297 | ||
298 | if (!rtc->ops) | 298 | if (!rtc->ops) |
299 | err = -ENODEV; | 299 | err = -ENODEV; |
diff --git a/drivers/rtc/rtc-dev.c b/drivers/rtc/rtc-dev.c index 0a870b7e5c32..ae3bd4de7675 100644 --- a/drivers/rtc/rtc-dev.c +++ b/drivers/rtc/rtc-dev.c | |||
@@ -221,7 +221,7 @@ static long rtc_dev_ioctl(struct file *file, | |||
221 | 221 | ||
222 | err = mutex_lock_interruptible(&rtc->ops_lock); | 222 | err = mutex_lock_interruptible(&rtc->ops_lock); |
223 | if (err) | 223 | if (err) |
224 | return -EBUSY; | 224 | return err; |
225 | 225 | ||
226 | /* check that the calling task has appropriate permissions | 226 | /* check that the calling task has appropriate permissions |
227 | * for certain ioctls. doing this check here is useful | 227 | * for certain ioctls. doing this check here is useful |