public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <guenter.roeck@ericsson.com>
To: Yong Wang <yong.y.wang@linux.intel.com>
Cc: Jean Delvare <khali@linux-fr.org>,
	Alan Cox <alan@linux.intel.com>,
	Kalhan Trisal <kalhan.trisal@intel.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"lm-sensors@lm-sensors.org" <lm-sensors@lm-sensors.org>
Subject: Re: [lm-sensors] [PATCH] hwmon/emc1403: remove unnecessary hwmon_device_unregister
Date: Mon, 13 Sep 2010 20:22:11 -0700	[thread overview]
Message-ID: <20100914032211.GA3497@ericsson.com> (raw)
In-Reply-To: <20100914023351.GA27145@ywang-moblin2.bj.intel.com>

On Mon, Sep 13, 2010 at 10:33:51PM -0400, Yong Wang wrote:
> It is unnecessary to call hwmon_device_unregister in error handling
> before hwmon_device_register is called.
> 
Not only unnecessary but wrong. Good catch.

> Signed-off-by: Yong Wang <yong.y.wang@intel.com>

Reviewed-by: Guenter Roeck <guenter.roeck@ericsson.com>

> ---
>  drivers/hwmon/emc1403.c |    1 -
>  1 files changed, 0 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/hwmon/emc1403.c b/drivers/hwmon/emc1403.c
> index 5b58b20..8dee3f3 100644
> --- a/drivers/hwmon/emc1403.c
> +++ b/drivers/hwmon/emc1403.c
> @@ -308,7 +308,6 @@ static int emc1403_probe(struct i2c_client *client,
>  	res = sysfs_create_group(&client->dev.kobj, &m_thermal_gr);
>  	if (res) {
>  		dev_warn(&client->dev, "create group failed\n");
> -		hwmon_device_unregister(data->hwmon_dev);
>  		goto thermal_error1;
>  	}
>  	data->hwmon_dev = hwmon_device_register(&client->dev);
> -- 
> 1.5.5.1
> 
> 
> _______________________________________________
> lm-sensors mailing list
> lm-sensors@lm-sensors.org
> http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

  reply	other threads:[~2010-09-14  3:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-14  2:33 [PATCH] hwmon/emc1403: remove unnecessary hwmon_device_unregister Yong Wang
2010-09-14  3:22 ` Guenter Roeck [this message]
2010-09-14  7:54   ` [lm-sensors] " Jean Delvare

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=20100914032211.GA3497@ericsson.com \
    --to=guenter.roeck@ericsson.com \
    --cc=alan@linux.intel.com \
    --cc=kalhan.trisal@intel.com \
    --cc=khali@linux-fr.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lm-sensors@lm-sensors.org \
    --cc=yong.y.wang@linux.intel.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