public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] hwmon/emc1403: remove unnecessary hwmon_device_unregister
@ 2010-09-14  2:33 Yong Wang
  2010-09-14  3:22 ` [lm-sensors] " Guenter Roeck
  0 siblings, 1 reply; 3+ messages in thread
From: Yong Wang @ 2010-09-14  2:33 UTC (permalink / raw)
  To: Jean Delvare, Alan Cox, Kalhan Trisal; +Cc: lm-sensors, linux-kernel

It is unnecessary to call hwmon_device_unregister in error handling
before hwmon_device_register is called.

Signed-off-by: Yong Wang <yong.y.wang@intel.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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [lm-sensors] [PATCH] hwmon/emc1403: remove unnecessary hwmon_device_unregister
  2010-09-14  2:33 [PATCH] hwmon/emc1403: remove unnecessary hwmon_device_unregister Yong Wang
@ 2010-09-14  3:22 ` Guenter Roeck
  2010-09-14  7:54   ` Jean Delvare
  0 siblings, 1 reply; 3+ messages in thread
From: Guenter Roeck @ 2010-09-14  3:22 UTC (permalink / raw)
  To: Yong Wang
  Cc: Jean Delvare, Alan Cox, Kalhan Trisal,
	linux-kernel@vger.kernel.org, lm-sensors@lm-sensors.org

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [lm-sensors] [PATCH] hwmon/emc1403: remove unnecessary  hwmon_device_unregister
  2010-09-14  3:22 ` [lm-sensors] " Guenter Roeck
@ 2010-09-14  7:54   ` Jean Delvare
  0 siblings, 0 replies; 3+ messages in thread
From: Jean Delvare @ 2010-09-14  7:54 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Yong Wang, Alan Cox, Kalhan Trisal, linux-kernel, lm-sensors

On Mon, 13 Sep 2010 20:22:11 -0700, Guenter Roeck wrote:
> 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>

Applied, thanks.

-- 
Jean Delvare

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-09-14  7:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-14  2:33 [PATCH] hwmon/emc1403: remove unnecessary hwmon_device_unregister Yong Wang
2010-09-14  3:22 ` [lm-sensors] " Guenter Roeck
2010-09-14  7:54   ` Jean Delvare

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox