projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
169c05c
)
hwmon: (iio_hwmon) Fix null pointer dereference
author
Axel Lin
<axel.lin@ingics.com>
Mon, 13 May 2013 13:37:26 +0000
(21:37 +0800)
committer
Guenter Roeck
<linux@roeck-us.net>
Mon, 13 May 2013 13:43:14 +0000
(06:43 -0700)
This patch fixes the null pointer dereference in goto error_release_channels
path when allocate memory for st fails.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/iio_hwmon.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/hwmon/iio_hwmon.c
b/drivers/hwmon/iio_hwmon.c
index 368497fa2627477d50246219f960980fdb058126..52b77afebde120a17ce75bf6401103cad556d021 100644
(file)
--- a/
drivers/hwmon/iio_hwmon.c
+++ b/
drivers/hwmon/iio_hwmon.c
@@
-161,7
+161,7
@@
static int iio_hwmon_probe(struct platform_device *pdev)
error_remove_group:
sysfs_remove_group(&dev->kobj, &st->attr_group);
error_release_channels:
- iio_channel_release_all(
st->
channels);
+ iio_channel_release_all(channels);
return ret;
}