| .. | .. |
|---|
| 6 | 6 | * Copyright (c) 2007 SUSE Linux Products GmbH |
|---|
| 7 | 7 | * Copyright (c) 2007 Tejun Heo <teheo@suse.de> |
|---|
| 8 | 8 | * |
|---|
| 9 | | - * Please see Documentation/filesystems/sysfs.txt for more information. |
|---|
| 9 | + * Please see Documentation/filesystems/sysfs.rst for more information. |
|---|
| 10 | 10 | */ |
|---|
| 11 | 11 | |
|---|
| 12 | 12 | #include <linux/fs.h> |
|---|
| .. | .. |
|---|
| 23 | 23 | { |
|---|
| 24 | 24 | struct kernfs_node *kn, *target = NULL; |
|---|
| 25 | 25 | |
|---|
| 26 | | - BUG_ON(!name || !parent); |
|---|
| 26 | + if (WARN_ON(!name || !parent)) |
|---|
| 27 | + return -EINVAL; |
|---|
| 27 | 28 | |
|---|
| 28 | 29 | /* |
|---|
| 29 | 30 | * We don't own @target_kobj and it may be removed at any time. |
|---|
| .. | .. |
|---|
| 133 | 134 | spin_unlock(&sysfs_symlink_target_lock); |
|---|
| 134 | 135 | kernfs_remove_by_name_ns(kobj->sd, name, ns); |
|---|
| 135 | 136 | } |
|---|
| 136 | | -EXPORT_SYMBOL_GPL(sysfs_delete_link); |
|---|
| 137 | 137 | |
|---|
| 138 | 138 | /** |
|---|
| 139 | 139 | * sysfs_remove_link - remove symlink in object's directory. |
|---|