diff options
| author | 2008-04-19 17:17:34 +0100 | |
|---|---|---|
| committer | 2008-04-19 17:17:34 +0100 | |
| commit | cf816ecb533ab96b883dfdc0db174598b5b5c4d2 (patch) | |
| tree | 1b7705db288ae2917105e624b01fdf81e0882bf1 /fs/sysfs/symlink.c | |
| parent | Merge branch 'omap2-upstream' into devel (diff) | |
| parent | [ARM] Remove leds-tosa.c (diff) | |
| download | wireguard-linux-cf816ecb533ab96b883dfdc0db174598b5b5c4d2.tar.xz wireguard-linux-cf816ecb533ab96b883dfdc0db174598b5b5c4d2.zip | |
Merge branch 'merge-fixes' into devel
Diffstat (limited to 'fs/sysfs/symlink.c')
| -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 void sysfs_remove_link(struct kobject * kobj, const char * name) { - sysfs_hash_and_remove(kobj->sd, name); + struct sysfs_dirent *parent_sd = NULL; + + if (!kobj) + parent_sd = &sysfs_root; + else + parent_sd = kobj->sd; + + sysfs_hash_and_remove(parent_sd, name); } static int sysfs_get_target_path(struct sysfs_dirent *parent_sd, |
