All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] [PATCH 1/3] hwmon: (lm90) Unregister hwmon device if interrupt setup fails
Date: Wed, 27 Nov 2013 18:26:51 +0000	[thread overview]
Message-ID: <5296396B.1020207@roeck-us.net> (raw)
In-Reply-To: <1385575486-8732-1-git-send-email-linux@roeck-us.net>

On 11/27/2013 10:04 AM, Guenter Roeck wrote:
> Commit 109b1283fb (hwmon: (lm90) Add support to handle IRQ) introduced
> interrupt support. Its error handling code fails to unregister the already
> registered hwmon device.
>
> Fixes: 109b1283fb532ac773a076748ffccf76a7067cab
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> ---
>   drivers/hwmon/lm90.c |    4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/hwmon/lm90.c b/drivers/hwmon/lm90.c
> index 4c4c142..8b8f3aa 100644
> --- a/drivers/hwmon/lm90.c
> +++ b/drivers/hwmon/lm90.c
> @@ -1610,12 +1610,14 @@ static int lm90_probe(struct i2c_client *client,
>   						"lm90", client);
>   		if (err < 0) {
>   			dev_err(dev, "cannot request IRQ %d\n", client->irq);
> -			goto exit_remove_files;
> +			goto exit_unregister;
>   		}
>   	}
>
>   	return 0;
>
> +exit_unregister:
> +	hwmon_device_unregister(data->hwmon_dev);
>   exit_remove_files:
>   	lm90_remove_files(client, data);
>   exit_restore:
>

Hi Jean,

please ignore the 1/3 in the headline. The other two patches are the conversion
to hwmon_device_register_with_groups which I'll need to test first.

Guenter



_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

  reply	other threads:[~2013-11-27 18:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-27 18:04 [lm-sensors] [PATCH 1/3] hwmon: (lm90) Unregister hwmon device if interrupt setup fails Guenter Roeck
2013-11-27 18:26 ` Guenter Roeck [this message]
2013-12-01 10:56 ` 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=5296396B.1020207@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=lm-sensors@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.