Skip to contentSkip to conversation

hwmon: (iio_hwmon) Fix null pointer dereference

PATCH Applied Axel Lin 2 participants 2 messages May 13, 2013 Hardware monitoring

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 hwmon: (iio_hwmon) Fix null pointer dereference

This patch fixes the null pointer dereference in goto error_release_channels path when allocate memory for st fails.

---
 drivers/hwmon/iio_hwmon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hwmon/iio_hwmon.c +1 -1
index 368497f..52b77af 100644
@@ -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;
 }
 
Signature · 9 lines
1.8.1.2




_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors