mfd: as3722: Fix wakeup source leaks on device unbind
Device can be unbound, so driver must also release memory for the wakeup source. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20250406-mfd-device-wakekup-leak-v1-2-318e14bdba0a@linaro.org Signed-off-by: Lee Jones <lee@kernel.org>pull/1285/head
parent
6d0b2398b2
commit
2c8294c9aa
|
|
@ -394,7 +394,9 @@ static int as3722_i2c_probe(struct i2c_client *i2c)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
device_init_wakeup(as3722->dev, true);
|
ret = devm_device_init_wakeup(as3722->dev);
|
||||||
|
if (ret)
|
||||||
|
return dev_err_probe(as3722->dev, ret, "Failed to init wakeup\n");
|
||||||
|
|
||||||
dev_dbg(as3722->dev, "AS3722 core driver initialized successfully\n");
|
dev_dbg(as3722->dev, "AS3722 core driver initialized successfully\n");
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue