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 <[email protected]> Reviewed-by: Baolin Wang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lee Jones <[email protected]>
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)