From patchwork Thu Jul 7 15:31:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 12909851 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [85.220.165.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 56E737C for ; Thu, 7 Jul 2022 15:32:13 +0000 (UTC) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o9TU3-000658-MR; Thu, 07 Jul 2022 17:32:03 +0200 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1o9TTx-004yuB-Rg; Thu, 07 Jul 2022 17:32:01 +0200 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1o9TU0-003b2C-Om; Thu, 07 Jul 2022 17:32:00 +0200 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Alessandro Zummo , Alexandre Belloni , Benson Leung Cc: Guenter Roeck , linux-rtc@vger.kernel.org, chrome-platform@lists.linux.dev, kernel@pengutronix.de Subject: [PATCH] rtc: cros-ec: Only warn once in .remove() about notifier_chain problems Date: Thu, 7 Jul 2022 17:31:56 +0200 Message-Id: <20220707153156.214841-1-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.36.1 Precedence: bulk X-Mailing-List: chrome-platform@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1118; h=from:subject; bh=rKlwaawf2TlbOMr0njWGxr8U8gq80b14nj+ASRlyR14=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBixvxpDW5qORKcLum5IH306Unj54IwAR+G15wc1Kg8 BjgGeHKJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCYsb8aQAKCRDB/BR4rcrsCTdKB/ 4in8/w/fLsSW+nXGzJK7HFCBFcWaoZh0W1TsJCXGP3PA2k0amZLhqggucPgpL0Dve5fpTepE1BBezd go1DI4icruIdDymSwIbkEMn6QS5zB5dTAohbwCaXeEIJCPoxbpwxH0ZB67RRh7g6r40KyVItuKVtI6 Wa/Q4Slp/tjJoh1/34KffSDYlwzWnNGq02TSzMHl2pHOth7vFzbFbDS8iacDhP2G93kTRxOpjrSzuG 4xWFgP32C5AD4C8cAcvYLpzEMtd1txW5LJnkjfWjEAaSrHpyAeywnZcYVQtyp7RuieInm+oWuRZZkd LVyC0Ue8D96gEN9tOlSp6xuVETK88a X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: chrome-platform@lists.linux.dev When a remove platform device callback returns an error code, the driver core emits an error message ("remove callback returned a non-zero value. This will be ignored.\n") and still removes the device. As the driver already emits a more specific error message, return 0 to suppress the core's error message. This is a preparation for making platform remove callbacks return void. Signed-off-by: Uwe Kleine-König Acked-by: Tzung-Bi Shih --- drivers/rtc/rtc-cros-ec.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) base-commit: f2906aa863381afb0015a9eb7fefad885d4e5a56 diff --git a/drivers/rtc/rtc-cros-ec.c b/drivers/rtc/rtc-cros-ec.c index 70626793ca69..887f5193e253 100644 --- a/drivers/rtc/rtc-cros-ec.c +++ b/drivers/rtc/rtc-cros-ec.c @@ -375,10 +375,8 @@ static int cros_ec_rtc_remove(struct platform_device *pdev) ret = blocking_notifier_chain_unregister( &cros_ec_rtc->cros_ec->event_notifier, &cros_ec_rtc->notifier); - if (ret) { + if (ret) dev_err(dev, "failed to unregister notifier\n"); - return ret; - } return 0; }