public inbox for linux-hwmon@vger.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Camel Guo <camel.guo@axis.com>
Cc: Jean Delvare <jdelvare@suse.com>,
	linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel@axis.com
Subject: Re: [PATCH] hwmon: (tmp401) Fix incorrect return value of tmp401_init_client
Date: Mon, 25 Apr 2022 11:19:15 -0700	[thread overview]
Message-ID: <20220425181915.GA4175249@roeck-us.net> (raw)
In-Reply-To: <20220425100019.562781-1-camel.guo@axis.com>

On Mon, Apr 25, 2022 at 12:00:19PM +0200, Camel Guo wrote:
> When ti,n-factor, ti,beta-compentation are not defined in devicetree,
> of_property_read_u32|s32 returns -EINVAL. In this case,
> tmp401_init_client should return 0 instead of simply pass ret to its
> caller.
> 
> Fixes: c825ca044988 ("hwmon: (tmp401) Add support of three advanced features")
> Signed-off-by: Camel Guo <camel.guo@axis.com>

Good catch. Thanks, applied.

Guenter

> ---
>  drivers/hwmon/tmp401.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/hwmon/tmp401.c b/drivers/hwmon/tmp401.c
> index 8f49da997367..a58a2f31a07e 100644
> --- a/drivers/hwmon/tmp401.c
> +++ b/drivers/hwmon/tmp401.c
> @@ -604,7 +604,7 @@ static int tmp401_init_client(struct tmp401_data *data)
>  			return ret;
>  	}
>  
> -	return ret;
> +	return 0;
>  }
>  
>  static int tmp401_detect(struct i2c_client *client,

      reply	other threads:[~2022-04-25 18:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-25 10:00 [PATCH] hwmon: (tmp401) Fix incorrect return value of tmp401_init_client Camel Guo
2022-04-25 18:19 ` 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=20220425181915.GA4175249@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=camel.guo@axis.com \
    --cc=jdelvare@suse.com \
    --cc=kernel@axis.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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