diff options
Diffstat (limited to 'fs/sysfs/dir.c')
-rw-r--r-- | fs/sysfs/dir.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/sysfs/dir.c b/fs/sysfs/dir.c index feeae8081c22..aa85f2874a9f 100644 --- a/fs/sysfs/dir.c +++ b/fs/sysfs/dir.c | |||
@@ -43,7 +43,8 @@ int sysfs_create_dir_ns(struct kobject *kobj, const void *ns) | |||
43 | kuid_t uid; | 43 | kuid_t uid; |
44 | kgid_t gid; | 44 | kgid_t gid; |
45 | 45 | ||
46 | BUG_ON(!kobj); | 46 | if (WARN_ON(!kobj)) |
47 | return -EINVAL; | ||
47 | 48 | ||
48 | if (kobj->parent) | 49 | if (kobj->parent) |
49 | parent = kobj->parent->sd; | 50 | parent = kobj->parent->sd; |