From nobody Wed Apr 24 02:05:13 2024 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 89AFCC25B0C for ; Sat, 6 Aug 2022 05:20:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237074AbiHFFUB (ORCPT ); Sat, 6 Aug 2022 01:20:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34014 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231974AbiHFFT6 (ORCPT ); Sat, 6 Aug 2022 01:19:58 -0400 Received: from smtp.smtpout.orange.fr (smtp-19.smtpout.orange.fr [80.12.242.19]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DBEE513F69 for ; Fri, 5 Aug 2022 22:19:55 -0700 (PDT) Received: from pop-os.home ([90.11.190.129]) by smtp.orange.fr with ESMTPA id KCE2oIRdG0UP7KCE2ofqLM; Sat, 06 Aug 2022 07:19:53 +0200 X-ME-Helo: pop-os.home X-ME-Auth: YWZlNiIxYWMyZDliZWIzOTcwYTEyYzlhMmU3ZiQ1M2U2MzfzZDfyZTMxZTBkMTYyNDBjNDJlZmQ3ZQ== X-ME-Date: Sat, 06 Aug 2022 07:19:53 +0200 X-ME-IP: 90.11.190.129 From: Christophe JAILLET To: Greg Kroah-Hartman , Chunfeng Yun Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , linux-usb@vger.kernel.org Subject: [PATCH] usb: common: usb-conn-gpio: Simplify some error message Date: Sat, 6 Aug 2022 07:19:49 +0200 Message-Id: <7705a9dff8e097070c492d6f4f8aafaaa890f049.1659763173.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" dev_err_probe() already prints the error code in a human readable way, so there is no need to duplicate it as a numerical value at the end of the message. Fixes: ddaf0d6dc467 ("usb: common: usb-conn-gpio: use dev_err_probe() to pr= int log") Signed-off-by: Christophe JAILLET --- drivers/usb/common/usb-conn-gpio.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/usb/common/usb-conn-gpio.c b/drivers/usb/common/usb-co= nn-gpio.c index b39c9f1c375d..44c5127175b7 100644 --- a/drivers/usb/common/usb-conn-gpio.c +++ b/drivers/usb/common/usb-conn-gpio.c @@ -208,10 +208,9 @@ static int usb_conn_probe(struct platform_device *pdev) if (PTR_ERR(info->vbus) =3D=3D -ENODEV) info->vbus =3D NULL; =20 - if (IS_ERR(info->vbus)) { - ret =3D PTR_ERR(info->vbus); - return dev_err_probe(dev, ret, "failed to get vbus :%d\n", ret); - } + if (IS_ERR(info->vbus)) + return dev_err_probe(dev, PTR_ERR(info->vbus), + "failed to get vbus\n"); =20 info->role_sw =3D usb_role_switch_get(dev); if (IS_ERR(info->role_sw)) --=20 2.34.1