mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: linux-i2c@vger.kernel.org, Jean Delvare <jdelvare@suse.com>,
	linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] hwmon: w83781d: convert to i2c_new_dummy_device
Date: Mon, 22 Jul 2019 11:30:06 -0700	[thread overview]
Message-ID: <20190722183006.GA16898@roeck-us.net> (raw)
In-Reply-To: <20190722172611.3797-4-wsa+renesas@sang-engineering.com>

On Mon, Jul 22, 2019 at 07:26:10PM +0200, Wolfram Sang wrote:
> Move from i2c_new_dummy() to i2c_new_dummy_device(), so we now get an
> ERRPTR which we use in error handling.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Applied to hwmon-next.

Thanks,
Guenter

> ---
> 
> Generated with coccinelle. Build tested by me and buildbot. Not tested on HW.
> 
>  drivers/hwmon/w83781d.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/hwmon/w83781d.c b/drivers/hwmon/w83781d.c
> index d2c04b6a3f2b..015f1ea31966 100644
> --- a/drivers/hwmon/w83781d.c
> +++ b/drivers/hwmon/w83781d.c
> @@ -894,12 +894,12 @@ w83781d_detect_subclients(struct i2c_client *new_client)
>  	}
>  
>  	for (i = 0; i < num_sc; i++) {
> -		data->lm75[i] = i2c_new_dummy(adapter, sc_addr[i]);
> -		if (!data->lm75[i]) {
> +		data->lm75[i] = i2c_new_dummy_device(adapter, sc_addr[i]);
> +		if (IS_ERR(data->lm75[i])) {
>  			dev_err(&new_client->dev,
>  				"Subclient %d registration at address 0x%x failed.\n",
>  				i, sc_addr[i]);
> -			err = -ENOMEM;
> +			err = PTR_ERR(data->lm75[i]);
>  			if (i == 1)
>  				goto ERROR_SC_3;
>  			goto ERROR_SC_2;

      reply	other threads:[~2019-07-22 18:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-22 17:26 [PATCH 0/3] hwmon: convert subsystem to i2c_new_dummy_device() Wolfram Sang
2019-07-22 17:26 ` [PATCH 1/3] hwmon: asb100: convert to i2c_new_dummy_device Wolfram Sang
2019-07-22 18:28   ` Guenter Roeck
2019-07-22 17:26 ` [PATCH 2/3] hwmon: smm665: " Wolfram Sang
2019-07-22 18:29   ` Guenter Roeck
2019-07-22 17:26 ` [PATCH 3/3] hwmon: w83781d: " Wolfram Sang
2019-07-22 18:30   ` 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=20190722183006.GA16898@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=jdelvare@suse.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wsa+renesas@sang-engineering.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

Powered by JetHome