From 72a3a509f992b6bd182b3380913fe7b4f801075f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Tue, 14 Mar 2023 19:00:59 +0100 Subject: hwspinlock: omap: Emit only one error message for errors in .remove() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If a remove callback of a platform driver returns a non-zero value, the driver core emits an error message, otherwise ignores the value and completes unbinding the device. As omap_hwspinlock_remove() already emits an error message, suppress the core's error message by returning zero. Signed-off-by: Uwe Kleine-König Acked-by: Baolin Wang Link: https://lore.kernel.org/r/20230314180100.2865801-1-u.kleine-koenig@pengutronix.de Signed-off-by: Bjorn Andersson --- drivers/hwspinlock/omap_hwspinlock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/hwspinlock') diff --git a/drivers/hwspinlock/omap_hwspinlock.c b/drivers/hwspinlock/omap_hwspinlock.c index dfe82952671b..a2538c67396f 100644 --- a/drivers/hwspinlock/omap_hwspinlock.c +++ b/drivers/hwspinlock/omap_hwspinlock.c @@ -153,7 +153,7 @@ static int omap_hwspinlock_remove(struct platform_device *pdev) ret = hwspin_lock_unregister(bank); if (ret) { dev_err(&pdev->dev, "%s failed: %d\n", __func__, ret); - return ret; + return 0; } pm_runtime_disable(&pdev->dev); -- cgit v1.2.3