提交 4510d198 编写于 作者: A Axel Lin 提交者: Guenter Roeck

hwmon: (iio_hwmon) Fix missing iio_channel_release_all call if devm_kzalloc fail

Signed-off-by: NAxel Lin <axel.lin@ingics.com>
Acked-by: NJonathan Cameron <jic23@kernel.org>
Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
上级 f722406f
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册