diff options
Diffstat (limited to 'fs/sysfs/group.c')
| -rw-r--r-- | fs/sysfs/group.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/sysfs/group.c b/fs/sysfs/group.c index 1eb2d6307663..57038604d4a8 100644 --- a/fs/sysfs/group.c +++ b/fs/sysfs/group.c | |||
| @@ -112,7 +112,8 @@ static int internal_create_group(struct kobject *kobj, int update, | |||
| 112 | kgid_t gid; | 112 | kgid_t gid; |
| 113 | int error; | 113 | int error; |
| 114 | 114 | ||
| 115 | BUG_ON(!kobj || (!update && !kobj->sd)); | 115 | if (WARN_ON(!kobj || (!update && !kobj->sd))) |
| 116 | return -EINVAL; | ||
| 116 | 117 | ||
| 117 | /* Updates may happen before the object has been instantiated */ | 118 | /* Updates may happen before the object has been instantiated */ |
| 118 | if (unlikely(update && !kobj->sd)) | 119 | if (unlikely(update && !kobj->sd)) |
