Linux USB
 help / color / mirror / Atom feed
From: Romain Gantois <romain.gantois@bootlin.com>
To: heikki.krogerus@linux.intel.com, gregkh@linuxfoundation.org,
	Xichao Zhao <zhao.xichao@vivo.com>
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	Xichao Zhao <zhao.xichao@vivo.com>
Subject: Re: [PATCH] usb: typec: mux: Remove the use of dev_err_probe()
Date: Tue, 19 Aug 2025 16:46:39 +0200	[thread overview]
Message-ID: <6186026.lOV4Wx5bFT@fw-rgant> (raw)
In-Reply-To: <20250819112451.587817-1-zhao.xichao@vivo.com>

[-- Attachment #1: Type: text/plain, Size: 927 bytes --]

On Tuesday, 19 August 2025 13:24:51 CEST Xichao Zhao wrote:
> The dev_err_probe() doesn't do anything when error is '-ENOMEM'.
> Therefore, remove the useless call to dev_err_probe(), and just
> return the value instead.
> 
> Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com>
> ---
>  drivers/usb/typec/mux/tusb1046.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/typec/mux/tusb1046.c
> b/drivers/usb/typec/mux/tusb1046.c index b4f45c217b59..3c1a4551c2fb 100644
> --- a/drivers/usb/typec/mux/tusb1046.c
> +++ b/drivers/usb/typec/mux/tusb1046.c
> @@ -129,7 +129,7 @@ static int tusb1046_i2c_probe(struct i2c_client *client)
> 
>  	priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
>  	if (!priv)
> -		return dev_err_probe(dev, -ENOMEM, "failed to allocate driver 
data\n");
> +		return -ENOMEM;
> 
>  	priv->client = client;

Reviewed-by: Romain Gantois <romain.gantois@bootlin.com>



[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2025-08-19 14:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-19 11:24 [PATCH] usb: typec: mux: Remove the use of dev_err_probe() Xichao Zhao
2025-08-19 14:46 ` Romain Gantois [this message]
2025-08-21  7:23 ` Heikki Krogerus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6186026.lOV4Wx5bFT@fw-rgant \
    --to=romain.gantois@bootlin.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=zhao.xichao@vivo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox