From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: Xichao Zhao <zhao.xichao@vivo.com>
Cc: romain.gantois@bootlin.com, gregkh@linuxfoundation.org,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] usb: typec: mux: Remove the use of dev_err_probe()
Date: Thu, 21 Aug 2025 10:23:17 +0300 [thread overview]
Message-ID: <aKbJZa1tQMpf0QWX@kuha.fi.intel.com> (raw)
In-Reply-To: <20250819112451.587817-1-zhao.xichao@vivo.com>
On Tue, Aug 19, 2025 at 07:24:51PM +0800, 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>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.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;
>
> --
> 2.34.1
--
heikki
prev parent reply other threads:[~2025-08-21 7:23 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
2025-08-21 7:23 ` Heikki Krogerus [this message]
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=aKbJZa1tQMpf0QWX@kuha.fi.intel.com \
--to=heikki.krogerus@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=romain.gantois@bootlin.com \
--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