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/symlink.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/symlink.c')
| -rw-r--r-- | fs/sysfs/symlink.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/sysfs/symlink.c b/fs/sysfs/symlink.c index 215c225b2ca1..c4deecc80f67 100644 --- a/fs/sysfs/symlink.c +++ b/fs/sysfs/symlink.c @@ -23,7 +23,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. |
