linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Input: iqs62x-keys - Suppress duplicated error message in .remove()
@ 2023-03-18 22:51 Uwe Kleine-König
  2023-03-20  4:28 ` Dmitry Torokhov
  2023-03-27 23:27 ` Jeff LaBundy
  0 siblings, 2 replies; 5+ messages in thread
From: Uwe Kleine-König @ 2023-03-18 22:51 UTC (permalink / raw)
  To: Dmitry Torokhov, Mattijs Korpershoek, Jeff LaBundy; +Cc: linux-input, kernel

If a platform driver's remove callback returns non-zero the driver core
emits an error message. In such a case however iqs62x_keys_remove()
already issued a (better) message. So return zero to suppress the
generic message.

This patch has no other side effects as platform_remove() ignores the
return value of .remove() after the warning.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/input/keyboard/iqs62x-keys.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/input/keyboard/iqs62x-keys.c b/drivers/input/keyboard/iqs62x-keys.c
index db793a550c25..02ceebad7bda 100644
--- a/drivers/input/keyboard/iqs62x-keys.c
+++ b/drivers/input/keyboard/iqs62x-keys.c
@@ -320,7 +320,7 @@ static int iqs62x_keys_remove(struct platform_device *pdev)
 	if (ret)
 		dev_err(&pdev->dev, "Failed to unregister notifier: %d\n", ret);
 
-	return ret;
+	return 0;
 }
 
 static struct platform_driver iqs62x_keys_platform_driver = {

base-commit: fe15c26ee26efa11741a7b632e9f23b01aca4cc6
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-03-29  2:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-18 22:51 [PATCH] Input: iqs62x-keys - Suppress duplicated error message in .remove() Uwe Kleine-König
2023-03-20  4:28 ` Dmitry Torokhov
2023-03-27 23:27 ` Jeff LaBundy
2023-03-28  6:08   ` Uwe Kleine-König
2023-03-29  2:00     ` Jeff LaBundy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).