[patch] powerpc: sysfs fix compiler warning
Josh Boyer
jwboyer at linux.vnet.ibm.com
Sat Jun 23 04:38:39 EST 2007
On Fri, 2007-06-22 at 19:48 +0200, Christian Krafft wrote:
> From: Christian Krafft <krafft at de.ibm.com>
>
> This patch fixes the following compiler warning:
> arch/powerpc/kernel/sysfs.c:385: warning: ignoring return value of
> `sysfs_create_group',
>
> Signed-off-by: Christian Krafft <krafft at de.ibm.com>
>
> Index: linux-2.6.22-rc5/arch/powerpc/kernel/sysfs.c
> ===================================================================
> --- linux-2.6.22-rc5.orig/arch/powerpc/kernel/sysfs.c
> +++ linux-2.6.22-rc5/arch/powerpc/kernel/sysfs.c
> @@ -380,16 +380,23 @@ int cpu_add_sysdev_attr_group(struct att
> {
> int cpu;
> struct sys_device *sysdev;
> + int error;
>
> mutex_lock(&cpu_mutex);
>
> for_each_possible_cpu(cpu) {
> sysdev = get_cpu_sysdev(cpu);
> - sysfs_create_group(&sysdev->kobj, attrs);
> + error |= sysfs_create_group(&sysdev->kobj, attrs);
Why are you or'ing the return value with whatever is in the
uninitialized variable?
josh
More information about the Linuxppc-dev
mailing list