lkml.org 
[lkml]   [2010]   [Sep]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [lm-sensors] [PATCH] hwmon/emc1403: remove unnecessary hwmon_device_unregister
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


\
 
 \ /
  Last update: 2010-09-14 05:25    [W:0.048 / U:0.460 seconds]
©2003-2014 Jasper Spaans. Advertise on this site