Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp3634869rdh; Thu, 28 Sep 2023 19:16:47 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFdnEN/LqBAswK/oosNBtzfQ5ZGwfaPIilgARR0EeobGzIPC7GrVlGh0NyAZxben+8YWmVZ X-Received: by 2002:a05:6a00:190d:b0:68c:638b:e2c6 with SMTP id y13-20020a056a00190d00b0068c638be2c6mr3206811pfi.9.1695953807425; Thu, 28 Sep 2023 19:16:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695953807; cv=none; d=google.com; s=arc-20160816; b=OLnX+Dn+b0/DVZ6rJazoM+uywVUw40Hv3Wpn9ZV8aQ+T+65fvXdqap1Ku6AEmYIwFu Dr1O49fwTr7IbrLGlzoIRZ7WguIcyrJZTbVdcur3ePUGTc1zGuuih9qeHN0LEPuq5/vh vtsSjT70YgL4Qeg/u03w9OCEltgAYjMN6fSQJckVo2/9D00fEn+vStFqTzLqzEdPBSU/ untVXUv8o5P58KNrToA8nQH+3PytYmS4sfBdMdCiJKsh5PcKWOp/xZVCOmeRmQ8PN1DL Mrm8ubrd7eJip33SWf/GAO+1WPfNN7j1R+ieWaDVQd8Jzn3Br3S2GpT+9ACE2lnuJb99 oCeg== 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 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=rere.qmqm.pl Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id i73-20020a636d4c000000b00563df2ba23fsi19647725pgc.845.2023.09.28.19.16.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Sep 2023 19:16:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; 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 23.128.96.35 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 D63AE8028B9B; Thu, 28 Sep 2023 14:06:27 -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 S232429AbjI1VGQ (ORCPT + 99 others); Thu, 28 Sep 2023 17:06:16 -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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: =?UTF-8?q?Micha=C5=82=20Miros=C5=82aw?= 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:28 -0700 (PDT) Convert all error exits from probe() to dev_err_probe(). Acked-by: Peter Chen Signed-off-by: Michał Mirosław --- 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; } -- 2.39.2