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: Marion & Christophe JAILLET X-Patchwork-Id: 682309 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 54ABFC77B7F for ; Sun, 14 May 2023 11:25:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234152AbjENLZy (ORCPT ); Sun, 14 May 2023 07:25:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44746 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233804AbjENLZw (ORCPT ); Sun, 14 May 2023 07:25:52 -0400 Received: from smtp.smtpout.orange.fr (smtp-29.smtpout.orange.fr [80.12.242.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E1D3D1737 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 Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org 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);