From 3fd269e74f2feec973f45ee11d822faeda4fe284 Mon Sep 17 00:00:00 2001 From: Uwe Kleine-König Date: Tue, 26 Jan 2021 17:58:34 +0100 Subject: amba: Make the remove callback return void MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit All amba drivers return 0 in their remove callback. Together with the driver core ignoring the return value anyhow, it doesn't make sense to return a value here. Change the remove prototype to return void, which makes it explicit that returning an error value doesn't work as expected. This simplifies changing the core remove callback to return void, too. Reviewed-by: Ulf Hansson Reviewed-by: Arnd Bergmann Acked-by: Alexandre Belloni Acked-by: Dmitry Torokhov Acked-by: Krzysztof Kozlowski # for drivers/memory Acked-by: Mark Brown Acked-by: Linus Walleij Acked-by: Suzuki K Poulose # for hwtracing/coresight Acked-By: Vinod Koul # for dmaengine Acked-by: Guenter Roeck # for watchdog Acked-by: Wolfram Sang # for I2C Acked-by: Takashi Iwai # for sound Acked-by: Vladimir Zapolskiy # for memory/pl172 Acked-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20210126165835.687514-5-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König --- drivers/amba/bus.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'drivers/amba') diff --git a/drivers/amba/bus.c b/drivers/amba/bus.c index 8c4a42df47c6..48b5d4b4e889 100644 --- a/drivers/amba/bus.c +++ b/drivers/amba/bus.c @@ -300,11 +300,10 @@ static int amba_remove(struct device *dev) { struct amba_device *pcdev = to_amba_device(dev); struct amba_driver *drv = to_amba_driver(dev->driver); - int ret = 0; pm_runtime_get_sync(dev); if (drv->remove) - ret = drv->remove(pcdev); + drv->remove(pcdev); pm_runtime_put_noidle(dev); /* Undo the runtime PM settings in amba_probe() */ @@ -315,7 +314,7 @@ static int amba_remove(struct device *dev) amba_put_disable_pclk(pcdev); dev_pm_domain_detach(dev, true); - return ret; + return 0; } static void amba_shutdown(struct device *dev) -- cgit