From patchwork Fri Feb 17 09:53:17 2023 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: 654875 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2784FC05027 for ; Fri, 17 Feb 2023 09:53:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229718AbjBQJxe (ORCPT ); Fri, 17 Feb 2023 04:53:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48470 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229436AbjBQJxd (ORCPT ); Fri, 17 Feb 2023 04:53:33 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E87D65F257 for ; Fri, 17 Feb 2023 01:53:32 -0800 (PST) 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 1pSxQj-0001Bz-GS; Fri, 17 Feb 2023 10:53:25 +0100 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 1pSxQg-005YFM-TS; Fri, 17 Feb 2023 10:53:24 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pSxQh-004I1u-Fu; Fri, 17 Feb 2023 10:53:23 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Wim Van Sebroeck , Guenter Roeck , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea Cc: linux-watchdog@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de Subject: [PATCH] watchdog: at91rm9200: Only warn once about problems in .remove() Date: Fri, 17 Feb 2023 10:53:17 +0100 Message-Id: <20230217095317.1213387-1-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1019; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=KCFCul1v7TIKLH577N/fp9oqdUwOHohszUuC4GmMQVs=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBj706K832g6brobPK/iG1WsgyKDXYEPahLdnc4B vxqba+uWLCJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCY+9OigAKCRDB/BR4rcrs CTvbB/9hR2AJfN4Nnwl/XUWQoa0lWCxmm83VlXuVTHoH+xnqjh8sKqfa0iBPGCrCWeQyE0NJuZv meH9xvEgp0NFaLBGwXeXkjz4FBUmYOOyrGYhAR618vqZ387eLsTmRHMaBGzCKQoEo7PE/mH7Vb9 xF7y/dmcyOh2kLhvDlpgFgZi/6PpTpkjxKIAZkEo1uQB9he7hmXC2Vkp6lM9eue3UQKGlQa8WQV NxFeOMCpQ9Cf4IbwDuQ29+mJ3U0cufx3euEly3cr0K8tRdkH9zltetRIRrbG6rr9A3ETxOcbgKj KGzFjXiwA9W4PHO1MtlpmIX0rbOtODM8XsedB1EHnAQCbtct 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: linux-watchdog@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-watchdog@vger.kernel.org The single difference between returning 0 and returning an error code in a platform remove callback is that in the latter case the platform core emits a warning about the error being ignored. at91wdt_remove() already emits a warning in the error case, so suppress the more generic (and less helpful) one by returning 0. Signed-off-by: Uwe Kleine-König --- drivers/watchdog/at91rm9200_wdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) base-commit: 033c40a89f55525139fd5b6342281b09b97d05bf diff --git a/drivers/watchdog/at91rm9200_wdt.c b/drivers/watchdog/at91rm9200_wdt.c index 5126454bb861..d57409c1a4d1 100644 --- a/drivers/watchdog/at91rm9200_wdt.c +++ b/drivers/watchdog/at91rm9200_wdt.c @@ -270,7 +270,7 @@ static int at91wdt_remove(struct platform_device *pdev) misc_deregister(&at91wdt_miscdev); at91wdt_miscdev.parent = NULL; - return res; + return 0; } static void at91wdt_shutdown(struct platform_device *pdev)