From patchwork Thu Sep 28 21:06:04 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: 146331 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:cae8:0:b0:403:3b70:6f57 with SMTP id r8csp3642159vqu; Thu, 28 Sep 2023 15:34:57 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFQFURqnI685LxqhXovVBUlwPRHoFLE98+pw/+24yBwh6k35URLtKgOLlvflcqlgtPgMigD X-Received: by 2002:a17:903:1c2:b0:1c7:432f:b0be with SMTP id e2-20020a17090301c200b001c7432fb0bemr867099plh.18.1695940496895; Thu, 28 Sep 2023 15:34:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695940496; cv=none; d=google.com; s=arc-20160816; b=MbG1O3a6l1jJqxhckBZFl1cZyKPryPEuohOyoVHUMTdjRijcwE3iuPEaowqdgZRHqR uwfKS1v0oQbCCXbLGIMGh9WWUjxhKDEgheCnm5X/1OxqQg1SS2udXwAoOsKxkkDGOuMM d78tQ6FkA37ND0uGftGDC/SQESTlaLLifG2QZLOVvNLNAM2lcANsZPFulZmJnoZauc0X Jd7MBM75olcXYrHE7v7MFB3fE1VUDCB4Z+KVuGnqqJaVbMwsGeZCyIAyN5oQ+POO/XyA C38ELer6AJlQQ35B1vcXPP/gfubFUCHMyZa58bS928uGtTIawnVfu7MCMftOnBh/0ZiU FExw== 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=kUUOSYWGc2BBVGhxOX/k648wV3J08WRTrTfplFWqsmk=; fh=zQprc+BN/1CmKyuHy/0iXh+e9cjwmVG5rMoC8nM7n0E=; b=m7mXyBItgqIkjNXJRNjhyIxC1WV38kOP21Qjjjk4CVsy29ols/vIFigNWPcGipxBsq AdjFhwY7YRjYO/fAMHILtoXn4tvpA1NxIPZ7bI0qRImzJ1w81gtNX7dBAgfSHCcvV5HG WJbb24+Xnmtuoz2f4gMGDhT8RasfK2MPAfU+rxF2bzXqTHP8LiqYMwYe9xWPLv+M4sTo pLfPBz9eOpuvId63vmaO/fdTt0ha3y1KKTde03UpUv1xkMFiI2NYkkdm2P9seYHinQCy A+/lVU/3urK0+bcL2iv/8GhJRaJYl2G41n57uKIeUqya3Ucubb81lTqLmoYRObJuH/j5 BcrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rere.qmqm.pl header.s=1 header.b=WaBXonGg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id q18-20020a17090311d200b001b89551a392si21105604plh.113.2023.09.28.15.34.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Sep 2023 15:34:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@rere.qmqm.pl header.s=1 header.b=WaBXonGg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (Postfix) with ESMTP id BE3C680D0819; Thu, 28 Sep 2023 14:06:45 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232432AbjI1VGR (ORCPT + 22 others); Thu, 28 Sep 2023 17:06:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54882 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232294AbjI1VGO (ORCPT ); Thu, 28 Sep 2023 17:06:14 -0400 Received: from rere.qmqm.pl (rere.qmqm.pl [91.227.64.183]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 09AAF1B3; Thu, 28 Sep 2023 14:06:06 -0700 (PDT) Received: from remote.user (localhost [127.0.0.1]) by rere.qmqm.pl (Postfix) with ESMTPSA id 4RxQxm2mFBzHw; Thu, 28 Sep 2023 23:06:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rere.qmqm.pl; s=1; t=1695935164; bh=fNP2q8TKBOP90zAoPZo4VQ/VCwhK8Oy/8pLuJIyccf0=; h=Date:In-Reply-To:References:Subject:From:To:Cc:From; b=WaBXonGgsNPQmrfIt3nHJF4TgqENLz9f14w4yIl7lcqAHNZJA1dsMu/ZdBLrqNcn0 nE+I1dLwYbj+aMlvoICURqeHbw2lOb8Iq1zElAvGHJfVcX6dDDMUb3iXHHiQ32y2y4 OUkpz8ZRyvgn6TC1c6chsUdm4QHf/9UFl6MqVFjtAV4SHccSj1qjq/ZvSFJxI4jKxe 3Z3Fg9St1RxKoPqWnaCOafu/HkU3oJdQiuoZpVfvpTZ5a/lywxfY6s4a1t7ViJW9xw XNjKyhcK4Hau7uoQGaHMMJSWEIL5SLA5p5vR2rdADcixZ9qf1GeqEqAvj7o9A1QRb+ 4cJJ1zotJWMuQ== X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at mail Date: Thu, 28 Sep 2023 23:06:04 +0200 Message-Id: <43d03aad1c394d9995f69d13ca1176f9ff8a8dab.1695934946.git.mirq-linux@rere.qmqm.pl> In-Reply-To: References: Subject: [PATCH v2 3/3] usb: chipidea: tegra: Consistently use dev_err_probe() MIME-Version: 1.0 From: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= To: Dmitry Osipenko , Greg Kroah-Hartman , Peter Chen , Peter Geis , Thierry Reding Cc: linux-usb@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email 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 (groat.vger.email [0.0.0.0]); Thu, 28 Sep 2023 14:06:45 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778322502364206290 X-GMAIL-MSGID: 1778322502364206290 Convert all error exits from probe() to dev_err_probe(). Acked-by: Peter Chen Signed-off-by: Michał Mirosław Acked-by: Thierry Reding --- 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; }