Commit 4551383e authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Jonathan Cameron
Browse files

iio: imu: st_lsm6dsx: Fix wakeup source leaks on device unbind

parent ad3764b4
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -2719,8 +2719,11 @@ int st_lsm6dsx_probe(struct device *dev, int irq, int hw_id,
	}

	if (device_property_read_bool(dev, "wakeup-source") ||
	    (pdata && pdata->wakeup_source))
		device_init_wakeup(dev, true);
	    (pdata && pdata->wakeup_source)) {
		err = devm_device_init_wakeup(dev);
		if (err)
			return dev_err_probe(dev, err, "Failed to init wakeup\n");
	}

	return 0;
}