public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Yong Wang <yong.y.wang@linux.intel.com>
To: Jean Delvare <khali@linux-fr.org>,
	Alan Cox <alan@linux.intel.com>,
	Kalhan Trisal <kalhan.trisal@intel.com>
Cc: lm-sensors@lm-sensors.org, linux-kernel@vger.kernel.org
Subject: [PATCH] hwmon/emc1403: remove unnecessary hwmon_device_unregister
Date: Tue, 14 Sep 2010 10:33:51 +0800	[thread overview]
Message-ID: <20100914023351.GA27145@ywang-moblin2.bj.intel.com> (raw)

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


             reply	other threads:[~2010-09-14  2:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-14  2:33 Yong Wang [this message]
2010-09-14  3:22 ` [lm-sensors] [PATCH] hwmon/emc1403: remove unnecessary hwmon_device_unregister Guenter Roeck
2010-09-14  7:54   ` 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=20100914023351.GA27145@ywang-moblin2.bj.intel.com \
    --to=yong.y.wang@linux.intel.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 \
    /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