aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2020-11-19 17:16:02 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-12-30 11:53:17 +0100
commitddbed6d02751a02f95f520767cf4900feaa5a93d (patch)
tree3296c9a5f9abdc2d93f720743a0a4e598475f524 /drivers/gpu
parent098a597f31150ea6a6d4a3e978bdc3b27212a64d (diff)
downloadkernel_replicant_linux-ddbed6d02751a02f95f520767cf4900feaa5a93d.tar.gz
kernel_replicant_linux-ddbed6d02751a02f95f520767cf4900feaa5a93d.tar.bz2
kernel_replicant_linux-ddbed6d02751a02f95f520767cf4900feaa5a93d.zip
spi: fix resource leak for drivers without .remove callback
[ Upstream commit 440408dbadfe47a615afd0a0a4a402e629be658a ] Consider an spi driver with a .probe but without a .remove callback (e.g. rtc-ds1347). The function spi_drv_probe() is called to bind a device and so dev_pm_domain_attach() is called. As there is no remove callback spi_drv_remove() isn't called at unbind time however and so calling dev_pm_domain_detach() is missed and the pm domain keeps active. To fix this always use both spi_drv_probe() and spi_drv_remove() and make them handle the respective callback not being set. This has the side effect that for a (hypothetical) driver that has neither .probe nor remove the clk and pm domain setup is done. Fixes: 33cf00e57082 ("spi: attach/detach SPI device to the ACPI power domain") Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20201119161604.2633521-1-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/gpu')
0 files changed, 0 insertions, 0 deletions