diff options
author | Oliver Schinagl <oliver@schinagl.nl> | 2013-07-14 19:05:56 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-07-16 13:57:36 -0400 |
commit | 388a8c353d671d4ea2f638be84cfcbb912afdcf2 (patch) | |
tree | 65ec95b89c0620b909b398d42ef0695fb681dc17 /fs | |
parent | 6ab9cea16075ea707022753395f340b67f64304c (diff) |
sysfs: prevent warning when only using binary attributes
When only using bin_attrs instead of attrs the kernel prints a warning
and refuses to create the sysfs entry. This fixes that.
Signed-off-by: Oliver Schinagl <oliver@schinagl.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/sysfs/group.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/sysfs/group.c b/fs/sysfs/group.c index e5719c6095c3..09a1a25cd145 100644 --- a/fs/sysfs/group.c +++ b/fs/sysfs/group.c | |||
@@ -93,8 +93,8 @@ static int internal_create_group(struct kobject *kobj, int update, | |||
93 | /* Updates may happen before the object has been instantiated */ | 93 | /* Updates may happen before the object has been instantiated */ |
94 | if (unlikely(update && !kobj->sd)) | 94 | if (unlikely(update && !kobj->sd)) |
95 | return -EINVAL; | 95 | return -EINVAL; |
96 | if (!grp->attrs) { | 96 | if (!grp->attrs && !grp->bin_attrs) { |
97 | WARN(1, "sysfs: attrs not set by subsystem for group: %s/%s\n", | 97 | WARN(1, "sysfs: (bin_)attrs not set by subsystem for group: %s/%s\n", |
98 | kobj->name, grp->name ? "" : grp->name); | 98 | kobj->name, grp->name ? "" : grp->name); |
99 | return -EINVAL; | 99 | return -EINVAL; |
100 | } | 100 | } |