Skip to content

Commit 37ef4aa

Browse files
krzklag-linaro
authored andcommitted
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>
1 parent 82ae581 commit 37ef4aa

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/mfd/sprd-sc27xx-spi.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,10 @@ static int sprd_pmic_probe(struct spi_device *spi)
210210
return ret;
211211
}
212212

213-
device_init_wakeup(&spi->dev, true);
213+
ret = devm_device_init_wakeup(&spi->dev);
214+
if (ret)
215+
return dev_err_probe(&spi->dev, ret, "Failed to init wakeup\n");
216+
214217
return 0;
215218
}
216219

0 commit comments

Comments
 (0)