diff options
author | David Brownell <dbrownell@users.sourceforge.net> | 2008-07-30 01:33:30 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-30 12:41:45 -0400 |
commit | b68bb2632453a9ca7d10a00d79adf60968cb4c05 (patch) | |
tree | 3093bd33da75ce165d0f9b0af8931d7eb4d4488a /drivers/rtc/rtc-dev.c | |
parent | 950d442ad053e660538cdaa6efc0e060c2a65062 (diff) |
rtc: don't return -EBUSY when mutex_lock_interruptible() fails
It was pointed out that the RTC framework handles its mutex locks oddly
... returning -EBUSY when interrupted. This fixes that by returning the
value of mutex_lock_interruptible() (i.e. -EINTR).
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/rtc/rtc-dev.c')
-rw-r--r-- | drivers/rtc/rtc-dev.c | 2 |
1 files changed, 1 insertions, 1 deletions
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 |