From patchwork Sat Sep 23 19:41:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= X-Patchwork-Id: 13396872 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5A62ECE7A8C for ; Sat, 23 Sep 2023 19:42:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:From:MIME-Version:Subject: References:In-Reply-To:Message-Id:Date:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=TwldZMmrI9GvonHotSX6i4EroYkQoNYuCe8TOTLvMzw=; b=Tf6xGckDwTue51GVbOOJZTRhsG k79ASBCcp3jfXkVpxP7FuMe/IuwBiv328qjLw+HLutlD8fn339vcujtxpaZnzU04wxB+a9zYo2m58 RdxUYJbygeDMp1YD8sauTzLkjaZB2t8K1iQHAHebKCmYUbisuvieSUsQHrlR8XdixvyZCifceTvIS ktcf7Rpzb7ycfvYyFaQfOicaWXTko1MT+POLs/BqUB6lXlXXc012waeCX5MTYrd6rOp5/QPvxq0qM ovsPWIsafohg7X+JnSvcr5rHDJZtyDRjYrJ1H4i7u6nNQ6ELfDqAb80sWvtSX83P9lw3/3YrpG/M4 owiVDYPA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qk8W4-00BOJy-15; Sat, 23 Sep 2023 19:42:12 +0000 Received: from rere.qmqm.pl ([91.227.64.183]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qk8W0-00BOHK-2H for linux-arm-kernel@lists.infradead.org; Sat, 23 Sep 2023 19:42:10 +0000 Received: from remote.user (localhost [127.0.0.1]) by rere.qmqm.pl (Postfix) with ESMTPSA id 4RtKK05YBczDJ; Sat, 23 Sep 2023 21:41:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rere.qmqm.pl; s=1; t=1695498116; bh=kFsKirDvyE7bdimLhfZJhpSM+ljGh33ev81Eebpilkw=; h=Date:In-Reply-To:References:Subject:From:To:Cc:From; b=S8EWylnI32XiWoR2ljwjjzelXKDlOubs3XTeFwGSX3ztDdWvxTh5fULLKkZruaI1y 8o8XD0JbSWC3/IgcpPK+oBLru+W4F7sPgoorM5lYqlxWlRmiS3S9ROuXlHlYyQxB2v wI6SyL+T8YznI+IzoFyKz0+FLEA+b8YrA6XuGO0udfJDfbsBtw2qhhjwnyv+YW1kSE xcgSJGCTZCA7+iyFRHIyArziN+ITt9By1XkJDQ+5lshxWWEwbx79xh+B6D+3pSWWk6 sLc16FfYwZO2Q0DcjHxO+XgROmY31FW2IrSrdw9JZlwFKj2OjO3p4slfXXkVMNXvyv Cu9GtZW2690kA== X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.8 at mail Date: Sat, 23 Sep 2023 21:41:56 +0200 Message-Id: In-Reply-To: References: Subject: [PATCH 3/3] usb: chipidea: tegra: Consistently use dev_err_probe() MIME-Version: 1.0 From: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= To: Peter Chen , Greg Kroah-Hartman , Jonathan Hunter , Dmitry Osipenko , Peter Geis , Thierry Reding Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org, linux-usb@vger.kernel.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230923_124208_905486_FF0967D4 X-CRM114-Status: UNSURE ( 9.65 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Convert all error exits from probe() to dev_err_probe(). Signed-off-by: Michał Mirosław Acked-by: Peter Chen --- drivers/usb/chipidea/ci_hdrc_tegra.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/drivers/usb/chipidea/ci_hdrc_tegra.c b/drivers/usb/chipidea/ci_hdrc_tegra.c index 8e78bf643e25..2cc305803217 100644 --- a/drivers/usb/chipidea/ci_hdrc_tegra.c +++ b/drivers/usb/chipidea/ci_hdrc_tegra.c @@ -293,14 +293,12 @@ static int tegra_usb_probe(struct platform_device *pdev) usb->phy = devm_usb_get_phy_by_phandle(&pdev->dev, "nvidia,phy", 0); if (IS_ERR(usb->phy)) return dev_err_probe(&pdev->dev, PTR_ERR(usb->phy), - "failed to get PHY\n"); + "failed to get PHY"); usb->clk = devm_clk_get(&pdev->dev, NULL); - if (IS_ERR(usb->clk)) { - err = PTR_ERR(usb->clk); - dev_err(&pdev->dev, "failed to get clock: %d\n", err); - return err; - } + if (IS_ERR(usb->clk)) + return dev_err_probe(&pdev->dev, PTR_ERR(usb->clk), + "failed to get clock"); err = devm_tegra_core_dev_init_opp_table_common(&pdev->dev); if (err) @@ -316,7 +314,7 @@ static int tegra_usb_probe(struct platform_device *pdev) err = tegra_usb_reset_controller(&pdev->dev); if (err) { - dev_err(&pdev->dev, "failed to reset controller: %d\n", err); + dev_err_probe(&pdev->dev, err, "failed to reset controller"); goto fail_power_off; } @@ -347,8 +345,8 @@ static int tegra_usb_probe(struct platform_device *pdev) usb->dev = ci_hdrc_add_device(&pdev->dev, pdev->resource, pdev->num_resources, &usb->data); if (IS_ERR(usb->dev)) { - err = PTR_ERR(usb->dev); - dev_err(&pdev->dev, "failed to add HDRC device: %d\n", err); + err = dev_err_probe(&pdev->dev, PTR_ERR(usb->dev), + "failed to add HDRC device"); goto phy_shutdown; }