From patchwork Tue Mar 7 06:56:02 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: 65327 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp2316996wrd; Tue, 7 Mar 2023 00:44:07 -0800 (PST) X-Google-Smtp-Source: AK7set98loIwwuZBLXBJka0IeybvbeJ1Vapp2qIfwzI1NXzqZEtFdxzsqBfOUDnDNgFk/Nil+N59 X-Received: by 2002:a17:90b:3b90:b0:233:d12f:f43a with SMTP id pc16-20020a17090b3b9000b00233d12ff43amr14994172pjb.1.1678178646840; Tue, 07 Mar 2023 00:44:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678178646; cv=none; d=google.com; s=arc-20160816; b=brXhZNlFR3ctMRy1otanr4YZkcNRGeWmZw1modzcSRT9A3e+a1rfuw0VhoV48GopdV ebMLNGL6i3k+ZT9OdklndGbGcuIB57vFNK0tLfs9rOZzv0wXP5IQBBQVJ6RahEiP+qfE 1FKUYTaO4UFMSnyfATKS4V0xpGaTyLfnU2XipZpxTUp3vbZ03HPPJDiHlIt8foG1Ot7y cNIJAg5vUvSeG7ZYuFKoF4DpR4TneWGSbI2Vmr1SWEDLqMxmPkV8kxPaIzz0SBGVKLh6 01dOB0vPsysYat+5d6lxSOJR2jenmzMWmIvFPkVHPjVLOw/WTyipFgtwXPEEfrEp1ple dGCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=Wb2lmFN40ZzLzFq45ndm7Ndhaop5PbRg0kuux6ZpDoM=; b=zM925AULBK+iY8yowm7r/WULXJveVK9gHm0BU0XCXFTn1ztHtPFLxiV8kUlmE6H6AJ vHzFnh6LsLdvcE5UFmXUrEPTAhSXj3xh3qcUdbWr/dS52sEB7YScJe5F1LmOCz6wZo1x eB23xzFbN7v6tSru2PufVVKMrd5av7/1iep36E5N1YN6DfBDXooE+rGW9gZPlCRjAcFa 8SppmY5TZSJMcXuOlWiUmaLJi13uMChL8NH9T/N1eu9T+Ef3bMy2IV00lKEFMx5wVCAc 0bzlzDXf+OBfK/0xOiVtK6NUiXRcNOjS1IlgkXD8NEUn9WOVfvAly8kgQPhr5U5oH/qv nXhw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m14-20020a17090ade0e00b00234ac93d720si11680759pjv.30.2023.03.07.00.43.52; Tue, 07 Mar 2023 00:44:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230060AbjCGISQ (ORCPT + 99 others); Tue, 7 Mar 2023 03:18:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230132AbjCGIR7 (ORCPT ); Tue, 7 Mar 2023 03:17:59 -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 F2BC84FF2F for ; Tue, 7 Mar 2023 00:17:48 -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 1pZSVk-0003g3-Lx; Tue, 07 Mar 2023 09:17:28 +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 1pZRF5-002Q7C-2R; Tue, 07 Mar 2023 07:56:11 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pZRF4-002uCe-Fg; Tue, 07 Mar 2023 07:56:10 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Krzysztof Kozlowski , Wim Van Sebroeck , Guenter Roeck Cc: Alim Akhtar , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de Subject: [PATCH v2 1/2] watchdog: s3c2410: Make s3c2410_get_wdt_drv_data() return an int Date: Tue, 7 Mar 2023 07:56:02 +0100 Message-Id: <20230307065603.2253054-2-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230307065603.2253054-1-u.kleine-koenig@pengutronix.de> References: <20230307065603.2253054-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3055; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=QceFBbZEoT2r3QXkJtJmxaZbpUExXmHFUHw+BMJmhf0=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkBt/6TEKme0kmgt7JVegTZDxiYYug5SE4NxQih VPgYL2kE1OJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZAbf+gAKCRDB/BR4rcrs CXwpCAChkMnOmUimP9KpfnLPRyxLYVU2V1Brn39p4n9zCVkmYCCSPFmht0SwyRNaS9WAUJpfs7e uKZBJHf2fd07AcMrVn/Y5C286m6ohE9LXqc6bBCIx3+XVVztm/R/IFeRlhDSIDQkEUU3PV3qXyb boDmopsutluKy9t8sDh7QZL8Fh4cpxEzZ72ND7A0lLK7kLcsDWyt1Q7loRjdHq2Wuxn8e9HE6py HtHtSXb7Aq2lsnw9dnufMMwiNVlwSyMrnB9eBuhRLBp6a6sI/8Jlch1mPMY4AScl8BaKs01yawL TRSdgU+kGi4wCQGaYxTJa8sU0DbcGjTkhDmQ0CXl0cOLjmgw 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-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759697852791369206?= X-GMAIL-MSGID: =?utf-8?q?1759697852791369206?= This is a preparation for making more use of dev_err_probe(). The idea is that s3c2410_get_wdt_drv_data() (as it's called only by .probe()) can make effective use of dev_err_probe() only if it returns an int. For that the assignment to wdt->drv_data has to happen in the function. The caller can then just pass on the return value in the error case. This seems to be nicer for the compiler: bloatometer reports for an ARCH=arm s3c6400_defconfig build: add/remove: 1/1 grow/shrink: 0/1 up/down: 4/-64 (-60) Function old new delta __initcall__kmod_s3c2410_wdt__209_821_s3c2410wdt_driver_init6 - 4 +4 __initcall__kmod_s3c2410_wdt__209_819_s3c2410wdt_driver_init6 4 - -4 s3c2410wdt_probe 1332 1272 -60 There is no semantical change. (Just one minor difference: Before this patch wdt->drv_data was always assigned, now that only happens in the non-error case. That doesn't matter however as *wdt is freed in the error case.) Signed-off-by: Uwe Kleine-König Reviewed-by: Guenter Roeck --- drivers/watchdog/s3c2410_wdt.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/drivers/watchdog/s3c2410_wdt.c b/drivers/watchdog/s3c2410_wdt.c index 58b262ca4e88..f3de8ef499c3 100644 --- a/drivers/watchdog/s3c2410_wdt.c +++ b/drivers/watchdog/s3c2410_wdt.c @@ -579,8 +579,8 @@ static inline unsigned int s3c2410wdt_get_bootstatus(struct s3c2410_wdt *wdt) return 0; } -static inline const struct s3c2410_wdt_variant * -s3c2410_get_wdt_drv_data(struct platform_device *pdev) +static inline int +s3c2410_get_wdt_drv_data(struct platform_device *pdev, struct s3c2410_wdt *wdt) { const struct s3c2410_wdt_variant *variant; struct device *dev = &pdev->dev; @@ -603,24 +603,26 @@ s3c2410_get_wdt_drv_data(struct platform_device *pdev) "samsung,cluster-index", &index); if (err) { dev_err(dev, "failed to get cluster index\n"); - return NULL; + return -EINVAL; } switch (index) { case 0: - return variant; + break; case 1: - return (variant == &drv_data_exynos850_cl0) ? + variant = (variant == &drv_data_exynos850_cl0) ? &drv_data_exynos850_cl1 : &drv_data_exynosautov9_cl1; + break; default: dev_err(dev, "wrong cluster index: %u\n", index); - return NULL; + return -EINVAL; } } #endif - return variant; + wdt->drv_data = variant; + return 0; } static void s3c2410wdt_wdt_disable_action(void *data) @@ -644,9 +646,9 @@ static int s3c2410wdt_probe(struct platform_device *pdev) spin_lock_init(&wdt->lock); wdt->wdt_device = s3c2410_wdd; - wdt->drv_data = s3c2410_get_wdt_drv_data(pdev); - if (!wdt->drv_data) - return -EINVAL; + ret = s3c2410_get_wdt_drv_data(pdev, wdt); + if (ret) + return ret; if (wdt->drv_data->quirks & QUIRKS_HAVE_PMUREG) { wdt->pmureg = syscon_regmap_lookup_by_phandle(dev->of_node, From patchwork Tue Mar 7 06:56:03 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: 65324 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp2310173wrd; Tue, 7 Mar 2023 00:22:21 -0800 (PST) X-Google-Smtp-Source: AK7set87VmbYDqRQjZv8U5hgHIITnmZaAx5a9um0HmjAAYfubUlLpmbKHBPRv0bQjvE05drux/bi X-Received: by 2002:a62:8494:0:b0:5a8:9f71:315b with SMTP id k142-20020a628494000000b005a89f71315bmr14191499pfd.4.1678177341152; Tue, 07 Mar 2023 00:22:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678177341; cv=none; d=google.com; s=arc-20160816; b=NbC3MKeELIvwGJwmOz8/AGwRzmVJVE143yta4PU5WGCsBu41bIUbQnBSa1PozjYpGz J3eYIyAtrRhmGTsNEOFFePj+Wuueyb5PeTOoTeAXLM6WHf+jJ+yjDZ9gfi9eUwTZorTF bSJS1UG++4f8KSA+vrbch8l7uFkRD7jd42KF3Y4FspExIU/YoAZ5W0ASXfqpoWn9+qX+ qHhco9UBrdCrBaX/Vv14h3lHnt0Cl2bvyCZ95OxtSnamPD4Z8YAnaPJ2Eod7LCC0omI4 lnT3LqRFJ2FBPAHf9sUbJIIE0u+qCG64pK83tTXm6LNAfKU3fPAmCRZZH4Flgwfmz6z5 CxGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=DQWL/ROrfztinT4rKTQ81wxWlsZos5Rml9ZRnSmxmTA=; b=erQKR9JO5NQylGPVbBlhg1f1ylbfuqABMRxzIVRZHGKauaPWSTB+/WkQ3Fj7c34Lh9 OsSxrW8Ya9w4BEiL/BjdC7z1WVP/cgdXQo2OcR8lJcbC4mzySbNSjbBnMob68Q94f4J1 hlJ6ACbzaUpZIUnvhdNNF/QrYXW09eHqQN3tSTZVybH+W4VgwXR+HYSViZLp8GxZdIAd HpdubE9vTMLhgyDHoa/ZCei+bdFM0kL+Ty1xysa1jni/w7s/MWT01r/hG+tOb1t9Rd99 fvVESI2A7YlbWYr3WpulXmTC1O9LZK397NLHXTzVVxVwMxg3tq+Hgr1SrtHPmZpzFf9R KMHg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k20-20020a6568d4000000b004fc205aa2adsi11141759pgt.65.2023.03.07.00.22.08; Tue, 07 Mar 2023 00:22:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230111AbjCGIS2 (ORCPT + 99 others); Tue, 7 Mar 2023 03:18:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230139AbjCGISA (ORCPT ); Tue, 7 Mar 2023 03:18:00 -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 B31AF509A8 for ; Tue, 7 Mar 2023 00:17:50 -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 1pZSVk-0003g3-F5; Tue, 07 Mar 2023 09:17:28 +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 1pZRF5-002Q7K-GG; Tue, 07 Mar 2023 07:56:11 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pZRF4-002uCh-KT; Tue, 07 Mar 2023 07:56:10 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Krzysztof Kozlowski , Wim Van Sebroeck , Guenter Roeck Cc: Alim Akhtar , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de Subject: [PATCH v2 2/2] watchdog: s3c2410_wdt: Simplify using dev_err_probe() Date: Tue, 7 Mar 2023 07:56:03 +0100 Message-Id: <20230307065603.2253054-3-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230307065603.2253054-1-u.kleine-koenig@pengutronix.de> References: <20230307065603.2253054-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2952; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=SPTADogXAYTaKc+C78RKrrt7xUHnzCo6ao7xCudFxtA=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkBt/9TgrXqvneQq8BrEXsLFVQzyVJH8K0F3nGq Km8agAZpKqJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZAbf/QAKCRDB/BR4rcrs CT+rB/0akvpL8yOXpGcUlsq2sQ4ODnKHZohwUCZxgzMAFJaXYYx+LolOaUIeX6lIaLOb8UqkscH EL49wR/amDpifqzJt8EMkomj+MtPyK0G5lEoUqGQERtPAdnSUO+pZZ5+7d2jscyqHIjX0Sgt6s9 HRZtF9agfhV1MQC5ad4mliPQwVhNYSKQY0INXrdjFjfLYvJQZ11KGjc7V0CaUCofAR+lxcIJdmP DNUSWE5pC/zJa3jjythRIdvI1m5twkxV9xNv5pDa4BEJKzy62NP9aRVN5OpIIQNTjEohNHR3nIy I3bMg7o/Nu+dHB62pqIz1mkJrfgjht/aahKNB8ItncGBxvB+ 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-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759696483549884866?= X-GMAIL-MSGID: =?utf-8?q?1759696483549884866?= Make use of dev_err_probe() also for error paths that don't have to handle -EPROBE_DEFER. While the code handing -EPROBE_DEFER isn't used for these error paths, it still simpler as it cares for pretty printing the error code and usually needs one code line less as it combines message emitting and error returning. This also unifies the format of the error messages. Signed-off-by: Uwe Kleine-König Reviewed-by: Guenter Roeck --- drivers/watchdog/s3c2410_wdt.c | 29 ++++++++++------------------- 1 file changed, 10 insertions(+), 19 deletions(-) diff --git a/drivers/watchdog/s3c2410_wdt.c b/drivers/watchdog/s3c2410_wdt.c index f3de8ef499c3..e14d6d9050ce 100644 --- a/drivers/watchdog/s3c2410_wdt.c +++ b/drivers/watchdog/s3c2410_wdt.c @@ -601,10 +601,8 @@ s3c2410_get_wdt_drv_data(struct platform_device *pdev, struct s3c2410_wdt *wdt) err = of_property_read_u32(dev->of_node, "samsung,cluster-index", &index); - if (err) { - dev_err(dev, "failed to get cluster index\n"); - return -EINVAL; - } + if (err) + return dev_err_probe(dev, -EINVAL, "failed to get cluster index\n"); switch (index) { case 0: @@ -615,8 +613,7 @@ s3c2410_get_wdt_drv_data(struct platform_device *pdev, struct s3c2410_wdt *wdt) &drv_data_exynosautov9_cl1; break; default: - dev_err(dev, "wrong cluster index: %u\n", index); - return -EINVAL; + return dev_err_probe(dev, -EINVAL, "wrong cluster index: %u\n", index); } } #endif @@ -653,10 +650,8 @@ static int s3c2410wdt_probe(struct platform_device *pdev) if (wdt->drv_data->quirks & QUIRKS_HAVE_PMUREG) { wdt->pmureg = syscon_regmap_lookup_by_phandle(dev->of_node, "samsung,syscon-phandle"); - if (IS_ERR(wdt->pmureg)) { - dev_err(dev, "syscon regmap lookup failed.\n"); - return PTR_ERR(wdt->pmureg); - } + if (IS_ERR(wdt->pmureg)) + return dev_err_probe(dev, PTR_ERR(wdt->pmureg), "syscon regmap lookup failed.\n"); } wdt_irq = platform_get_irq(pdev, 0); @@ -694,21 +689,17 @@ static int s3c2410wdt_probe(struct platform_device *pdev) if (ret) { ret = s3c2410wdt_set_heartbeat(&wdt->wdt_device, S3C2410_WATCHDOG_DEFAULT_TIME); - if (ret == 0) { + if (ret == 0) dev_warn(dev, "tmr_margin value out of range, default %d used\n", S3C2410_WATCHDOG_DEFAULT_TIME); - } else { - dev_err(dev, "failed to use default timeout\n"); - return ret; - } + else + return dev_err_probe(dev, ret, "failed to use default timeout\n"); } ret = devm_request_irq(dev, wdt_irq, s3c2410wdt_irq, 0, pdev->name, pdev); - if (ret != 0) { - dev_err(dev, "failed to install irq (%d)\n", ret); - return ret; - } + if (ret != 0) + return dev_err_probe(dev, ret, "failed to install irq (%d)\n", ret); watchdog_set_nowayout(&wdt->wdt_device, nowayout); watchdog_set_restart_priority(&wdt->wdt_device, 128);