sysfs: fix warning when creating a sysfs group without attributes
authorJavi Merino <javi.merino@arm.com>
Thu, 15 Jan 2015 16:17:45 +0000 (16:17 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 Feb 2015 23:50:31 +0000 (15:50 -0800)
commitadf305f77878880fa5868a7179979da93be68d83
treef87b173d3848b06bbe620142452803c64b78723c
parent68ff2a00dbf590dc9483c20f85fd1f1faa054604
sysfs: fix warning when creating a sysfs group without attributes

When attempting to create a gropu without attrs, the warning prints the
name of the group.  However, the check for name being a NULL pointer is
wrong: it uses the pointer to the name when it's NULL.  Fix it to use
the name if present, otherwise just put an empty string.

Cc: Bruno Prémont <bonbons@linux-vserver.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Javi Merino <javi.merino@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/sysfs/group.c
This page took 0.024826 seconds and 5 git commands to generate.