lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Sun, 22 Aug 2010 22:48:05 +0200
From:	Jean Delvare <khali@...ux-fr.org>
To:	Axel Lin <axel.lin@...il.com>
Cc:	linux-kernel <linux-kernel@...r.kernel.org>,
	Paul Thomas <pthomas8589@...il.com>, lm-sensors@...sensors.org
Subject: Re: [PATCH] hwmon: (ads7871) Fix ads7871_probe init path

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@...il.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@...il.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ