mfd: sprd-sc27xx: 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> Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com> Link: https://lore.kernel.org/r/20250406-mfd-device-wakekup-leak-v1-8-318e14bdba0a@linaro.org Signed-off-by: Lee Jones <lee@kernel.org>pull/1285/head
parent
82ae581e56
commit
37ef4aa403
|
|
@ -210,7 +210,10 @@ static int sprd_pmic_probe(struct spi_device *spi)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
device_init_wakeup(&spi->dev, true);
|
ret = devm_device_init_wakeup(&spi->dev);
|
||||||
|
if (ret)
|
||||||
|
return dev_err_probe(&spi->dev, ret, "Failed to init wakeup\n");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue