Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4510d198 authored by Axel Lin's avatar Axel Lin Committed by Guenter Roeck
Browse files

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

parent f722406f
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -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;