diff options
| author | Greg Kroah-Hartman <[email protected]> | 2019-01-15 14:20:53 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2019-01-15 14:20:53 +0000 |
| commit | bdfe0df1e97beedc15f68ee6556830548e81f63f (patch) | |
| tree | ed4f0eb7acb8814642eb1fb4da0ac28704dc4fe0 /fs/sysfs/group.c | |
| parent | driver core: drop use of BUS_ATTR() (diff) | |
| parent | Linux 5.0-rc2 (diff) | |
| download | kernel-bdfe0df1e97beedc15f68ee6556830548e81f63f.tar.gz kernel-bdfe0df1e97beedc15f68ee6556830548e81f63f.zip | |
Merge 5.0-rc2 into driver-core-next
We want the driver core changes in that branch in here to build on top
of.
Signed-off-by: Greg Kroah-Hartman <[email protected]>
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)) |
