projects
/
GitHub
/
mt8127
/
android_kernel_alcatel_ttab.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
21fa54e
)
iio: double unlock on error path
author
Dan Carpenter
<dan.carpenter@oracle.com>
Wed, 11 Jul 2012 06:34:00 +0000
(07:34 +0100)
committer
Jonathan Cameron
<jic23@kernel.org>
Thu, 12 Jul 2012 19:00:20 +0000
(20:00 +0100)
We should be holding the mutex when we goto error_free_chans.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/inkern.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/iio/inkern.c
b/drivers/iio/inkern.c
index e2aded04996bb71c0f7cbabdc94ab9d14b9dc5e9..b5afc2ff34fd5c5f58d0c83e3d1538a3d901acac 100644
(file)
--- a/
drivers/iio/inkern.c
+++ b/
drivers/iio/inkern.c
@@
-198,11
+198,12
@@
struct iio_channel *iio_channel_get_all(const char *name)
iio_device_get(chans[mapind].indio_dev);
mapind++;
}
- mutex_unlock(&iio_map_list_lock);
if (mapind == 0) {
ret = -ENODEV;
goto error_free_chans;
}
+ mutex_unlock(&iio_map_list_lock);
+
return chans;
error_free_chans: