diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/sysfs/symlink.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/sysfs/symlink.c b/fs/sysfs/symlink.c index 5f66c4466151..817f5966edca 100644 --- a/fs/sysfs/symlink.c +++ b/fs/sysfs/symlink.c | |||
@@ -87,7 +87,14 @@ int sysfs_create_link(struct kobject * kobj, struct kobject * target, const char | |||
87 | 87 | ||
88 | void sysfs_remove_link(struct kobject * kobj, const char * name) | 88 | void sysfs_remove_link(struct kobject * kobj, const char * name) |
89 | { | 89 | { |
90 | sysfs_hash_and_remove(kobj->sd, name); | 90 | struct sysfs_dirent *parent_sd = NULL; |
91 | |||
92 | if (!kobj) | ||
93 | parent_sd = &sysfs_root; | ||
94 | else | ||
95 | parent_sd = kobj->sd; | ||
96 | |||
97 | sysfs_hash_and_remove(parent_sd, name); | ||
91 | } | 98 | } |
92 | 99 | ||
93 | static int sysfs_get_target_path(struct sysfs_dirent *parent_sd, | 100 | static int sysfs_get_target_path(struct sysfs_dirent *parent_sd, |