diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2021-01-26 17:58:31 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-03-04 12:14:49 +0100 |
commit | 8189846341680964a303c39e41cfc0043d8137f1 (patch) | |
tree | 625a77d7828adc09b30cfb78081b66de344e6f89 /drivers/iommu | |
parent | 4a586840a3a329f7ac90576379b655c12b7f2d9d (diff) | |
download | linux-rt-8189846341680964a303c39e41cfc0043d8137f1.tar.gz |
amba: Fix resource leak for drivers without .remove
[ Upstream commit de5d7adb89367bbc87b4e5ce7afe7ae9bd86dc12 ]
Consider an amba driver with a .probe but without a .remove callback (e.g.
pl061_gpio_driver). The function amba_probe() is called to bind a device
and so dev_pm_domain_attach() and others are called. As there is no remove
callback amba_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 the core driver callbacks and handle missing amba
callbacks there. For probe refuse registration as a driver without probe
doesn't make sense.
Fixes: 7cfe249475fd ("ARM: AMBA: Add pclk support to AMBA bus infrastructure")
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20210126165835.687514-2-u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/iommu')
0 files changed, 0 insertions, 0 deletions