Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp363962rwr; Tue, 25 Apr 2023 23:54:17 -0700 (PDT) X-Google-Smtp-Source: AKy350Ybmw8RPZstOQ8vatfzBESQgkehRIsBoiiXbITj21ONxnN8PA1Ds0fHBVMl1J88Vnb08ht4 X-Received: by 2002:a17:902:c951:b0:19e:8566:ea86 with SMTP id i17-20020a170902c95100b0019e8566ea86mr24370266pla.62.1682492057228; Tue, 25 Apr 2023 23:54:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682492057; cv=none; d=google.com; s=arc-20160816; b=OHPkRjLKUnipcuyE557JMvQhe6+yCviuH+qA2uUXWH0nnGASf2EDVTmt3jNY2dpVNR lZ2rdOnf1dlI+qDwZNwbBCuSMB9FWONPMbKIWoMMAHiNTGe9aHTdmHbNeBz4jhpASu90 8RMkE2zFcNI61xLT7s8w5YU2Eie4MwuCc6EkP2RTGqRTwmSUYqXI8eo6TxGAumbIloMD OPo1kk7XpHdQsIO3vNyZf4Lj2Wu5y22J7hXj5XSEHR/l6XiCECPbi7sSZWUhheUyU5mU nDERM3KLkb+Enbqzldt3nHlGV3jzzU5JSOkcfkECahAby8qMc3l5AlTOY6mvL8oEv1xF eOOg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=KAtKMyZd7naxOW+Rdd07F5idduJev/3DNob3RYZOyX4=; b=raEHy9WL+WT8aQjB2kaE2G1oWVTjdFV2vKcw4pmV2pcIlFSonY3bg/f9Lnj2P5UKwh w/Z9o69Qv0n/KKmbsflbnWwPeC4dqJ/ewwZI4Wrp63UGvFkoUQNUgCf3NWdVkCE/qN3D pQKRJU+cPRaukdB/7hjoRpc4zFwMKNEkCmGEtLF2EnM3nyIOm3jxk1akdDAmEKnonkGe SXXN5jvsfc/0AldcBpFp+9zVPKuy5z/eTF/8x7d13G8XaR0zxnxYm4GLPgSv0yX6+Mfj OQELythPL7eE060L2jAQDEvLZMdee3MDg1jJ4gvP7iY2Jw7fIQrY/Z/P58IrRAhUK3Ml vBJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=jtcYJmJz; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u7-20020a170902e5c700b001a63ff97bf2si16770177plf.496.2023.04.25.23.54.06; Tue, 25 Apr 2023 23:54:17 -0700 (PDT) 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; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=jtcYJmJz; 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 S239652AbjDZGxX (ORCPT + 99 others); Wed, 26 Apr 2023 02:53:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239361AbjDZGxU (ORCPT ); Wed, 26 Apr 2023 02:53:20 -0400 Received: from smtp.smtpout.orange.fr (smtp-22.smtpout.orange.fr [80.12.242.22]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B23230C1 for ; Tue, 25 Apr 2023 23:53:07 -0700 (PDT) Received: from pop-os.home ([86.243.2.178]) by smtp.orange.fr with ESMTPA id rZ1RpwxQZMX1TrZ1Rpoi5U; Wed, 26 Apr 2023 08:53:05 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1682491985; bh=KAtKMyZd7naxOW+Rdd07F5idduJev/3DNob3RYZOyX4=; h=From:To:Cc:Subject:Date; b=jtcYJmJzwcQembazxEh1mO1fWZlBgEiuhDv3/vLwH2iUAI4V/z95jF5L9LY4f9NZv si+K/7yFFq3Q40CA0IXnCQRaFpeWL0E9oZayGh/WBL8PnmOIk/HkBeeXiDRZNCUfK+ 7/tw9+Zg/0wISwhCG+qE2ANsbfBthzZBFAnOfbfUqPCW4k9TAGqS0lLye2TOg1c5YF KnaFAweV5CYgYxr9brt301VM67gBl5aJIzr7fwHvKizLctjMwJRrj4ivokDlbm6Vxc 4HIYWw564uGM0GJnlMve910B3V9GiDm/8CbePGw7nLbAuxA1GtndlpvqT80urrAdD1 L99XAbt5Z8CYw== X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Wed, 26 Apr 2023 08:53:05 +0200 X-ME-IP: 86.243.2.178 From: Christophe JAILLET To: Wim Van Sebroeck , Guenter Roeck , Philipp Zabel , Steffen Trumtrar Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , Wim Van Sebroeck , linux-watchdog@vger.kernel.org Subject: [PATCH 1/2] watchdog: dw_wdt: Fix the error handling path of dw_wdt_drv_probe() Date: Wed, 26 Apr 2023 08:52:48 +0200 Message-Id: X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 The commit in Fixes has only updated the remove function and missed the error handling path of the probe. Add the missing reset_control_assert() call. Fixes: 65a3b6935d92 ("watchdog: dw_wdt: get reset lines from dt") Signed-off-by: Christophe JAILLET --- drivers/watchdog/dw_wdt.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/watchdog/dw_wdt.c b/drivers/watchdog/dw_wdt.c index 6f88bd81f8a1..a1354a59eb37 100644 --- a/drivers/watchdog/dw_wdt.c +++ b/drivers/watchdog/dw_wdt.c @@ -635,7 +635,7 @@ static int dw_wdt_drv_probe(struct platform_device *pdev) ret = dw_wdt_init_timeouts(dw_wdt, dev); if (ret) - goto out_disable_clk; + goto out_assert_rst; wdd = &dw_wdt->wdd; wdd->ops = &dw_wdt_ops; @@ -667,12 +667,15 @@ static int dw_wdt_drv_probe(struct platform_device *pdev) ret = watchdog_register_device(wdd); if (ret) - goto out_disable_pclk; + goto out_assert_rst; dw_wdt_dbgfs_init(dw_wdt); return 0; +out_assert_rst: + reset_control_assert(dw_wdt->rst); + out_disable_pclk: clk_disable_unprepare(dw_wdt->pclk); -- 2.34.1