From patchwork Sun May 14 11:25:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 93675 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp6262140vqo; Sun, 14 May 2023 05:05:26 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ659X6eiBD9q/eIPORAh0S7Xr9538v1uQPe/WFAJFzU8RDlUtby78Err6VlEk7IvTCgYU+D X-Received: by 2002:a17:902:da91:b0:1ae:f37:c1b1 with SMTP id j17-20020a170902da9100b001ae0f37c1b1mr2494137plx.8.1684065925585; Sun, 14 May 2023 05:05:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684065925; cv=none; d=google.com; s=arc-20160816; b=KJgvLbM4pWY5sUREMWUK6va4bxKuNKiO1HXDybvnP/xtuZF0SBWKfDnQao/cBY5iz2 WCYip+eFm/ic0Gc+D6uimrThkObIp36ofuNFwaDvrhyLn1QqBY3VrliSxmeRliXLHc8v YAFvo9hkycVxsxImsvWU/WBEP+vFW1eXRX8Kuva7RzRieyXj00D4y+7yvUke/RNID8PR esp+QWJ5MrbkxFG03P3chcpekwQI3Ow7s8OfyyZueDJW1Lz4s/coxvLQRB3tYQCYjNxZ RjMerPEpQRnsyKt34yJP1tkw1F6ymmg8HochuR2Fdi+HAv+nGC+Ck0LRvwGY4WaYLpX3 UZhw== 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=Tk5vW0hntOxhf9yNrtaC6tGBir59FsySHi0FcdBXXAI=; b=vyMmRkU3hjyuxVULree2DIRRXg3/HubNhXsRfzH/OSpPkY9/pauboqK0Ztc7Q1jp6S stMAkSjjQ+eRVdkuHWJiS5x4WjqaU4Klz14rUuVxSN3pChiGhPJZ08yQLCxLjcBTQxtM 5s11BT+HrniizW5oy2MU0OdQYayN5ZELbB9JFA/6DaaTJg7sM9I/XR50lYbsAAY1qCz3 kPo9dLJ5Hj7lxnpijBtkpr7zGzXX38jiwa88DoqkxwWNrcI68tSUi/PcFLbcjx1FNNkX C4zrawVA4hpPXR+2N3wzQpfrpqAIe8KegWlsN98td9GYNrAUH6OxtXudW3iER3Q568Uz y8Ug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=FV2bx2ix; 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 n10-20020a170902d2ca00b001a6fce1d951si14641631plc.377.2023.05.14.05.05.09; Sun, 14 May 2023 05:05:25 -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=FV2bx2ix; 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 S232283AbjENLZx (ORCPT + 99 others); Sun, 14 May 2023 07:25:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44744 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233442AbjENLZw (ORCPT ); Sun, 14 May 2023 07:25:52 -0400 Received: from smtp.smtpout.orange.fr (smtp-30.smtpout.orange.fr [80.12.242.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E1E901982 for ; Sun, 14 May 2023 04:25:48 -0700 (PDT) Received: from pop-os.home ([86.243.2.178]) by smtp.orange.fr with ESMTPA id y9rEps5u40mnzy9rEpymsF; Sun, 14 May 2023 13:25:46 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1684063546; bh=Tk5vW0hntOxhf9yNrtaC6tGBir59FsySHi0FcdBXXAI=; h=From:To:Cc:Subject:Date; b=FV2bx2ix6lKtmL7MYGq8pRxmng1uDjs+Xs2Kw89KaEbCz660xESHOksEtl/mA6Y6f mWYet7tuNG1qLo6fQCaW+5rLv7BM9gsnz8Arv6CNNhVukWxc5JTHtcNxJLSpLBhA4K x3/zwsBsy6n/9oZxuunAXoHED3ntqDWeLEzYCfolEscH+fSiVxE4669/chJSGfPKam TX9Ueo8I/oMN/pB2hjXG0XfnaWBS7Lyx5JES0SR39M8JsRIwqvs3HMQb2Ney8ov7yi bfjUysLAdqgcAzT/mbkFeZCA0ze8q1CMOrtoOFpnCKFTYyL/QS4EZ9rM+pTrB6e9tx fdYhXYHd6QgaQ== X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sun, 14 May 2023 13:25:46 +0200 X-ME-IP: 86.243.2.178 From: Christophe JAILLET To: Greg Kroah-Hartman , Jiri Slaby , Thierry Reding , Jonathan Hunter , Philipp Zabel , Jeff Brasen Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , linux-serial@vger.kernel.org, linux-tegra@vger.kernel.org Subject: [PATCH] serial: 8250_tegra: Fix an error handling path in tegra_uart_probe() Date: Sun, 14 May 2023 13:25:42 +0200 Message-Id: X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 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_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham 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?1765871111837113693?= X-GMAIL-MSGID: =?utf-8?q?1765871111837113693?= If an error occurs after reset_control_deassert(), it must be re-asserted, as already done in the .remove() function. Fixes: c6825c6395b7 ("serial: 8250_tegra: Create Tegra specific 8250 driver") Signed-off-by: Christophe JAILLET --- drivers/tty/serial/8250/8250_tegra.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/tty/serial/8250/8250_tegra.c b/drivers/tty/serial/8250/8250_tegra.c index 2509e7f74ccf..89956bbf34d9 100644 --- a/drivers/tty/serial/8250/8250_tegra.c +++ b/drivers/tty/serial/8250/8250_tegra.c @@ -113,13 +113,15 @@ static int tegra_uart_probe(struct platform_device *pdev) ret = serial8250_register_8250_port(&port8250); if (ret < 0) - goto err_clkdisable; + goto err_ctrl_assert; platform_set_drvdata(pdev, uart); uart->line = ret; return 0; +err_ctrl_assert: + reset_control_assert(uart->rst); err_clkdisable: clk_disable_unprepare(uart->clk);