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: 144038 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:cae8:0:b0:403:3b70:6f57 with SMTP id r8csp484000vqu; Sat, 23 Sep 2023 21:04:26 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEcXaUr+PyMfviMX7EmCCc73G0KiUjD3ror/2z2qQ/xMm5UjhIMz1IjVsNUskbeIOpVoXA9 X-Received: by 2002:a17:902:ec83:b0:1c1:d5d1:a364 with SMTP id x3-20020a170902ec8300b001c1d5d1a364mr5527770plg.33.1695528266725; Sat, 23 Sep 2023 21:04:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695528266; cv=none; d=google.com; s=arc-20160816; b=JkT/yBPgV30R/Q/VoG6Hpda5WRS+27Qkc2vE5S3tjP8l+aj5i6gyHA4++7zcLwr5/B 9l7QpPPpGOioAsQsF1/EAoDirj4O//Flyj92sD2kFOBDb8BmkFq+E4vtpQZdVtZfogEe QqQ3C5d2y05s4z2LauEYWQTyOMPefLpXaKCZGkejo5GFCSP2pks8rNX9HiuH9zlS+Ptj ju3s5wI6ymWsRcOeN3z0fo+svzGTSZlmMrE+eIw8FHkl7YNA6iJWPoA6cJrdrIqxa90a 3V4ORuA+jM6CdfOBOCydDhEU5jmJ9UFThne4E2YSP1BkmKz1/oNFJXG9VX7gZl5+Lp8A DmHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:content-transfer-encoding :mime-version:subject:references:in-reply-to:message-id:date :dkim-signature; bh=ty4sITb12ZDfdB+zVFb8NEwYo4EPSEQnbFMyhWPYw2c=; fh=8Edhlrq5DWtEQB/rRaR26QZNN5ZbfJ7DbHKoRq3yn6Y=; b=y13YYUBfjn225tjeabLtKUaSvbncVu2F2B1WrRpaJ61GoiH8iJmaifAv1fqaMI2s5y V0DLr0OvE8lB7IkI8XFfU4ZqICe/rjE8xD7cklMw9v+ZzmYuK3XS17xxfwnLddzR2bDz +rOAgObEnsNwzbA/9tj9oJ4HUhjBwC4l4uEYqwWjRXp5Rszkevaq34SSEBzi0/vkOGrA P7zrQzKDdnfGaCEKqMt8FaUaLcPy92NBqSj2L0d0gGGEjm79QitQPPv9Jdkr6tePBdWN uqOpVJ9N0i6qV3roSV/VM46gO/r3TdLiwrutXq+DLJlkFl/XYWsHcIZsw7PFVcbuNBxH MPHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rere.qmqm.pl header.s=1 header.b=S8EWylnI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=rere.qmqm.pl Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id a10-20020a170902ecca00b001bbe13e753esi1417259plh.310.2023.09.23.21.04.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Sep 2023 21:04:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@rere.qmqm.pl header.s=1 header.b=S8EWylnI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=rere.qmqm.pl Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 05130812D233; Sat, 23 Sep 2023 12:42:17 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229660AbjIWTmL (ORCPT + 30 others); Sat, 23 Sep 2023 15:42:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60570 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229459AbjIWTmI (ORCPT ); Sat, 23 Sep 2023 15:42:08 -0400 Received: from rere.qmqm.pl (rere.qmqm.pl [91.227.64.183]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 77860AB for ; Sat, 23 Sep 2023 12:41:59 -0700 (PDT) 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-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_PASS,SPF_PASS 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-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Sat, 23 Sep 2023 12:42:17 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777890247542751982 X-GMAIL-MSGID: 1777890247542751982 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; }