mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Marcus Folkesson <marcus.folkesson@gmail.com>
Cc: Jean Delvare <jdelvare@suse.com>,
	linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] hwmon: (ina3221) return prober error code
Date: Fri, 10 Mar 2023 08:34:28 -0800	[thread overview]
Message-ID: <cfbf7f59-6f93-4e21-8a1b-88a769fcec0d@roeck-us.net> (raw)
In-Reply-To: <20230310075035.246083-1-marcus.folkesson@gmail.com>

On Fri, Mar 10, 2023 at 08:50:35AM +0100, Marcus Folkesson wrote:
> ret is set to 0 which do not indicate an error.
> Return -EINVAL instead.
> 
> Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>

Applied.

Thanks,
Guenter

> ---
>  drivers/hwmon/ina3221.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/hwmon/ina3221.c b/drivers/hwmon/ina3221.c
> index e06186986444..f3a4c5633b1e 100644
> --- a/drivers/hwmon/ina3221.c
> +++ b/drivers/hwmon/ina3221.c
> @@ -772,7 +772,7 @@ static int ina3221_probe_child_from_dt(struct device *dev,
>  		return ret;
>  	} else if (val > INA3221_CHANNEL3) {
>  		dev_err(dev, "invalid reg %d of %pOFn\n", val, child);
> -		return ret;
> +		return -EINVAL;
>  	}
>  
>  	input = &ina->inputs[val];

      reply	other threads:[~2023-03-10 16:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-10  7:50 Marcus Folkesson
2023-03-10 16:34 ` Guenter Roeck [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=cfbf7f59-6f93-4e21-8a1b-88a769fcec0d@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=jdelvare@suse.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcus.folkesson@gmail.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

all inboxes | Powered by JetHome®