Loading fs/sysfs/dir.c +2 −1 Original line number Diff line number Diff line Loading @@ -42,7 +42,8 @@ int sysfs_create_dir_ns(struct kobject *kobj, const void *ns) { struct kernfs_node *parent, *kn; BUG_ON(!kobj); if (WARN_ON(!kobj)) return -EINVAL; if (kobj->parent) parent = kobj->parent->sd; Loading fs/sysfs/file.c +4 −2 Original line number Diff line number Diff line Loading @@ -329,7 +329,8 @@ int sysfs_add_file(struct kernfs_node *parent, const struct attribute *attr, int sysfs_create_file_ns(struct kobject *kobj, const struct attribute *attr, const void *ns) { BUG_ON(!kobj || !kobj->sd || !attr); if (WARN_ON(!kobj || !kobj->sd || !attr)) return -EINVAL; return sysfs_add_file_mode_ns(kobj->sd, attr, false, attr->mode, ns); Loading Loading @@ -532,7 +533,8 @@ EXPORT_SYMBOL_GPL(sysfs_remove_file_from_group); int sysfs_create_bin_file(struct kobject *kobj, const struct bin_attribute *attr) { BUG_ON(!kobj || !kobj->sd || !attr); if (WARN_ON(!kobj || !kobj->sd || !attr)) return -EINVAL; return sysfs_add_file(kobj->sd, &attr->attr, true); } Loading fs/sysfs/group.c +2 −1 Original line number Diff line number Diff line Loading @@ -110,7 +110,8 @@ static int internal_create_group(struct kobject *kobj, int update, struct kernfs_node *kn; 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)) Loading fs/sysfs/symlink.c +2 −1 Original line number Diff line number Diff line Loading @@ -24,7 +24,8 @@ static int sysfs_do_create_link_sd(struct kernfs_node *parent, { struct kernfs_node *kn, *target = NULL; BUG_ON(!name || !parent); if (WARN_ON(!name || !parent)) return -EINVAL; /* * We don't own @target_kobj and it may be removed at any time. Loading Loading
fs/sysfs/dir.c +2 −1 Original line number Diff line number Diff line Loading @@ -42,7 +42,8 @@ int sysfs_create_dir_ns(struct kobject *kobj, const void *ns) { struct kernfs_node *parent, *kn; BUG_ON(!kobj); if (WARN_ON(!kobj)) return -EINVAL; if (kobj->parent) parent = kobj->parent->sd; Loading
fs/sysfs/file.c +4 −2 Original line number Diff line number Diff line Loading @@ -329,7 +329,8 @@ int sysfs_add_file(struct kernfs_node *parent, const struct attribute *attr, int sysfs_create_file_ns(struct kobject *kobj, const struct attribute *attr, const void *ns) { BUG_ON(!kobj || !kobj->sd || !attr); if (WARN_ON(!kobj || !kobj->sd || !attr)) return -EINVAL; return sysfs_add_file_mode_ns(kobj->sd, attr, false, attr->mode, ns); Loading Loading @@ -532,7 +533,8 @@ EXPORT_SYMBOL_GPL(sysfs_remove_file_from_group); int sysfs_create_bin_file(struct kobject *kobj, const struct bin_attribute *attr) { BUG_ON(!kobj || !kobj->sd || !attr); if (WARN_ON(!kobj || !kobj->sd || !attr)) return -EINVAL; return sysfs_add_file(kobj->sd, &attr->attr, true); } Loading
fs/sysfs/group.c +2 −1 Original line number Diff line number Diff line Loading @@ -110,7 +110,8 @@ static int internal_create_group(struct kobject *kobj, int update, struct kernfs_node *kn; 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)) Loading
fs/sysfs/symlink.c +2 −1 Original line number Diff line number Diff line Loading @@ -24,7 +24,8 @@ static int sysfs_do_create_link_sd(struct kernfs_node *parent, { struct kernfs_node *kn, *target = NULL; BUG_ON(!name || !parent); if (WARN_ON(!name || !parent)) return -EINVAL; /* * We don't own @target_kobj and it may be removed at any time. Loading