summaryrefslogtreecommitdiff
path: root/fs/sysfs/symlink.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-01-15 15:20:53 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-01-15 15:20:53 +0100
commitbdfe0df1e97beedc15f68ee6556830548e81f63f (patch)
treeed4f0eb7acb8814642eb1fb4da0ac28704dc4fe0 /fs/sysfs/symlink.c
parenta4723041857eaa35f189d237da769c4c63235544 (diff)
parent1c7fc5cbc33980acd13d668f1c8f0313d6ae9fd8 (diff)
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 <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/sysfs/symlink.c')
-rw-r--r--fs/sysfs/symlink.c3
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.