forked from mirrors/linux
mfd: rt5033: 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-7-318e14bdba0a@linaro.org Signed-off-by: Lee Jones <lee@kernel.org>
This commit is contained in:
parent
fd37695dae
commit
82ae581e56
1 changed files with 5 additions and 1 deletions
|
|
@ -98,7 +98,11 @@ static int rt5033_i2c_probe(struct i2c_client *i2c)
|
|||
return ret;
|
||||
}
|
||||
|
||||
device_init_wakeup(rt5033->dev, rt5033->wakeup);
|
||||
if (rt5033->wakeup) {
|
||||
ret = devm_device_init_wakeup(rt5033->dev);
|
||||
if (ret)
|
||||
return dev_err_probe(rt5033->dev, ret, "Failed to init wakeup\n");
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue