All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jean Delvare <khali@linux-fr.org>
To: Axel Lin <axel.lin@gmail.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	Paul Thomas <pthomas8589@gmail.com>,
	lm-sensors@lm-sensors.org
Subject: Re: [lm-sensors] [PATCH] hwmon: (ads7871) Fix ads7871_probe init
Date: Sun, 22 Aug 2010 20:48:05 +0000	[thread overview]
Message-ID: <20100822224805.0b84d94a@hyperion.delvare> (raw)
In-Reply-To: <1282487126.23014.11.camel@phoenix>

Hi Axel,

On Sun, 22 Aug 2010 22:25:26 +0800, Axel Lin wrote:
> >From 81e895683eaecb9e196c57c36b774c0908069d83 Mon Sep 17 00:00:00 2001
> From: Axel Lin <axel.lin@gmail.com>
> Date: Sun, 22 Aug 2010 22:10:01 +0800
> Subject: [PATCH] hwmon: (ads7871) Fix ads7871_probe init path
> 
> This patch includes below fixes:
> 
> 1. remove 'status' variable
> 2. remove unneeded initialization of 'err' variable
> 3. return missing error code if sysfs_create_group fail.
> 4. fix the init sequence as:
>    - check hardware existence
>    - kzalloc for ads7871_data
>    - sysfs_create_group
>    - hwmon_device_register
> 
> Signed-off-by: Axel Lin <axel.lin@gmail.com>
> ---
> 
> hi Jean,
> This patch is against linux-next ( on top of previous patch ).
> Reviews are welcome.

Looks good. I've folded this patch into the old one, and will send the
result to Linux shortly.

> I think it's ok to call sysfs_create_group() before hwmon_device_register().
> If hwmon_device_register failed, the device is not working anyway.
> We just need to make sure all the allocated resources are reclaimed in error path before return error.

Agreed.

-- 
Jean Delvare

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

WARNING: multiple messages have this Message-ID (diff)
From: Jean Delvare <khali@linux-fr.org>
To: Axel Lin <axel.lin@gmail.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	Paul Thomas <pthomas8589@gmail.com>,
	lm-sensors@lm-sensors.org
Subject: Re: [PATCH] hwmon: (ads7871) Fix ads7871_probe init path
Date: Sun, 22 Aug 2010 22:48:05 +0200	[thread overview]
Message-ID: <20100822224805.0b84d94a@hyperion.delvare> (raw)
In-Reply-To: <1282487126.23014.11.camel@phoenix>

Hi Axel,

On Sun, 22 Aug 2010 22:25:26 +0800, Axel Lin wrote:
> >From 81e895683eaecb9e196c57c36b774c0908069d83 Mon Sep 17 00:00:00 2001
> From: Axel Lin <axel.lin@gmail.com>
> Date: Sun, 22 Aug 2010 22:10:01 +0800
> Subject: [PATCH] hwmon: (ads7871) Fix ads7871_probe init path
> 
> This patch includes below fixes:
> 
> 1. remove 'status' variable
> 2. remove unneeded initialization of 'err' variable
> 3. return missing error code if sysfs_create_group fail.
> 4. fix the init sequence as:
>    - check hardware existence
>    - kzalloc for ads7871_data
>    - sysfs_create_group
>    - hwmon_device_register
> 
> Signed-off-by: Axel Lin <axel.lin@gmail.com>
> ---
> 
> hi Jean,
> This patch is against linux-next ( on top of previous patch ).
> Reviews are welcome.

Looks good. I've folded this patch into the old one, and will send the
result to Linux shortly.

> I think it's ok to call sysfs_create_group() before hwmon_device_register().
> If hwmon_device_register failed, the device is not working anyway.
> We just need to make sure all the allocated resources are reclaimed in error path before return error.

Agreed.

-- 
Jean Delvare

  reply	other threads:[~2010-08-22 20:48 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-16  1:31 [lm-sensors] [PATCH] hwmon: (ads7871) Fix ads7871_probe error path Axel Lin
2010-08-16  1:31 ` Axel Lin
2010-08-17 11:07 ` [lm-sensors] [PATCH] hwmon: (ads7871) Fix ads7871_probe error Jean Delvare
2010-08-17 11:07   ` [PATCH] hwmon: (ads7871) Fix ads7871_probe error path Jean Delvare
2010-08-17 15:15   ` [lm-sensors] [PATCH] hwmon: (ads7871) Fix ads7871_probe error Paul Thomas
2010-08-17 15:15     ` [PATCH] hwmon: (ads7871) Fix ads7871_probe error path Paul Thomas
2010-08-17 18:42     ` [lm-sensors] [PATCH] hwmon: (ads7871) Fix ads7871_probe error Jean Delvare
2010-08-17 18:42       ` [PATCH] hwmon: (ads7871) Fix ads7871_probe error path Jean Delvare
2010-08-22 14:25 ` [lm-sensors] [PATCH] hwmon: (ads7871) Fix ads7871_probe init path Axel Lin
2010-08-22 14:25   ` Axel Lin
2010-08-22 20:48   ` Jean Delvare [this message]
2010-08-22 20:48     ` 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=20100822224805.0b84d94a@hyperion.delvare \
    --to=khali@linux-fr.org \
    --cc=axel.lin@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lm-sensors@lm-sensors.org \
    --cc=pthomas8589@gmail.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 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.