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,  	kgid_t gid;  	int error; -	BUG_ON(!kobj || (!update && !kobj->sd)); +	if (WARN_ON(!kobj || (!update && !kobj->sd))) +		return -EINVAL;  	/* Updates may happen before the object has been instantiated */  	if (unlikely(update && !kobj->sd))  | 
