hwmon: (iio_hwmon) Fix missing iio_channel_release_all call if devm_kzalloc fail
Subsystems (2)
PATCH 1/1 hwmon: (iio_hwmon) Fix missing iio_channel_release_all call if devm_kzalloc fail
--- drivers/hwmon/iio_hwmon.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/hwmon/iio_hwmon.c +4 -2
@@ -84,8 +84,10 @@ static int iio_hwmon_probe(struct platform_device *pdev)return PTR_ERR (channels); st =devm_kzalloc (dev,sizeof (*st),GFP_KERNEL ); -if (st =NULL ) -return -ENOMEM ; +if (st =NULL ) { + ret = -ENOMEM ; + goto error_release_channels; + } st->channels = channels;
Signature · 9 lines
1.7.10.4 _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 1 line · Axel Lin
Signed-off-by Axel Lin <[email protected]>
Good catch.
Quoted 27 lines
--- drivers/hwmon/iio_hwmon.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)drivers/hwmon/iio_hwmon.c +4
-2@@ -84,8 +84,10 @@ static int iio_hwmon_probe(struct platform_device *pdev)return PTR_ERR (channels); st =devm_kzalloc (dev,sizeof (*st),GFP_KERNEL ); -if (st ==NULL ) -return -ENOMEM ; +if (st ==NULL ) { + ret = -ENOMEM ; + goto error_release_channels; + } st->channels = channels;Signature · 1 line
1.7.10.4
Jonathan Cameron
Acked-byQuoted 5 lines · Guenter Roeck
Quoted 1 line · Axel Lin
Signed-off-by Axel Lin <[email protected]>Good catch.
Acked-by Guenter Roeck <[email protected]>
Given the timing this will need to go in through hwmon after the merge window is closed. Sorry, busy week or I would have caught up with this earlier.
Quoted 22 lines
Quoted 22 lines
--- drivers/hwmon/iio_hwmon.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)drivers/hwmon/iio_hwmon.c +4
-2@@ -84,8 +84,10 @@ static int iio_hwmon_probe(struct platform_device *pdev)return PTR_ERR (channels); st =devm_kzalloc (dev,sizeof (*st),GFP_KERNEL ); -if (st =NULL ) -return -ENOMEM ; +if (st =NULL ) { + ret = -ENOMEM ; + goto error_release_channels; + } st->channels = channels;
Quoted 10 lines
Quoted 6 lines
Signature · 1 line
1.7.10.4--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Guenter Roeck
maintainerQuoted 11 lines · Jonathan Cameron
Quoted 5 lines · Guenter Roeck
Quoted 1 line · Axel Lin
Signed-off-by Axel Lin <[email protected]>Good catch.
Acked-by Guenter Roeck <[email protected]>Given the timing this will need to go in through hwmon after the merge window is closed. Sorry, busy week or I would have caught up with this earlier.
Acked-by Jonathan Cameron <[email protected]>
Ok.
Thanks,
Guenter