From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Ohad Ben-Cohen <ohad@wizery.com>, Bjorn Andersson <andersson@kernel.org>
Cc: Baolin Wang <baolin.wang@linux.alibaba.com>,
linux-omap@vger.kernel.org, linux-remoteproc@vger.kernel.org,
kernel@pengutronix.de
Subject: [PATCH 1/3] hwspinlock: omap: Emit only one error message for errors in .remove()
Date: Tue, 14 Mar 2023 19:00:59 +0100 [thread overview]
Message-ID: <20230314180100.2865801-1-u.kleine-koenig@pengutronix.de> (raw)
In-Reply-To: <20230314180020.2865734-1-u.kleine-koenig@pengutronix.de>
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 <u.kleine-koenig@pengutronix.de>
---
drivers/hwspinlock/omap_hwspinlock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hwspinlock/omap_hwspinlock.c b/drivers/hwspinlock/omap_hwspinlock.c
index 1fb3a2550e29..93d787c78f3c 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);
--
2.39.2
next prev parent reply other threads:[~2023-03-14 18:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-14 18:00 [PATCH 0/3] hwspinlock: Convert to platform remove callback returning void Uwe Kleine-König
2023-03-14 18:00 ` Uwe Kleine-König [this message]
2023-03-14 18:01 ` [PATCH 2/3] hwspinlock: omap: " Uwe Kleine-König
2023-04-12 17:16 ` [PATCH 0/3] hwspinlock: " Uwe Kleine-König
2023-05-30 13:56 ` Uwe Kleine-König
2023-05-31 1:12 ` Baolin Wang
2023-06-28 8:17 ` Uwe Kleine-König
2023-07-15 22:13 ` Bjorn Andersson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230314180100.2865801-1-u.kleine-koenig@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--cc=andersson@kernel.org \
--cc=baolin.wang@linux.alibaba.com \
--cc=kernel@pengutronix.de \
--cc=linux-omap@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=ohad@wizery.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).