public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: Markus Elfring <Markus.Elfring@web.de>
Cc: linux-usb@vger.kernel.org,
	Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	kernel-janitors@vger.kernel.org,
	LKML <linux-kernel@vger.kernel.org>,
	Anand Moon <linux.amoon@gmail.com>,
	Christophe Jaillet <christophe.jaillet@wanadoo.fr>
Subject: Re: [PATCH] usb: typec-mux: ptn36502: Omit a variable reassignment in ptn36502_probe()
Date: Tue, 21 Oct 2025 13:09:00 +0300	[thread overview]
Message-ID: <aPdbvC6Fz4kZ9x8q@kuha.fi.intel.com> (raw)
In-Reply-To: <b33ac7ab-e66f-4407-ba3e-ec4c70636fcf@web.de>

On Mon, Oct 20, 2025 at 06:00:06PM +0200, Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Mon, 20 Oct 2025 17:50:12 +0200
> 
> An error code was assigned to a variable and checked accordingly.
> This value was passed to a dev_err_probe() call in an if branch.
> This function is documented in the way that the same value is returned.
> Thus delete a redundant variable reassignment.
> 
> The source code was transformed by using the Coccinelle software.
> 
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>

Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>

> ---
>  drivers/usb/typec/mux/ptn36502.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/typec/mux/ptn36502.c b/drivers/usb/typec/mux/ptn36502.c
> index 129d9d24b932..b1a2977b974c 100644
> --- a/drivers/usb/typec/mux/ptn36502.c
> +++ b/drivers/usb/typec/mux/ptn36502.c
> @@ -339,7 +339,7 @@ static int ptn36502_probe(struct i2c_client *client)
>  
>  	ret = regulator_enable(ptn->vdd18_supply);
>  	if (ret) {
> -		ret = dev_err_probe(dev, ret, "Failed to enable vdd18\n");
> +		dev_err_probe(dev, ret, "Failed to enable vdd18\n");
>  		goto err_mux_put;
>  	}
>  
> -- 
> 2.51.1

-- 
heikki

      reply	other threads:[~2025-10-21 10:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-20 16:00 [PATCH] usb: typec-mux: ptn36502: Omit a variable reassignment in ptn36502_probe() Markus Elfring
2025-10-21 10:09 ` 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=aPdbvC6Fz4kZ9x8q@kuha.fi.intel.com \
    --to=heikki.krogerus@linux.intel.com \
    --cc=Markus.Elfring@web.de \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=linux.amoon@gmail.com \
    --cc=neil.armstrong@linaro.org \
    /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