diff options
Diffstat (limited to 'fs/sysfs/file.c')
-rw-r--r-- | fs/sysfs/file.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c index cc497994b2a8..3e1cc062a740 100644 --- a/fs/sysfs/file.c +++ b/fs/sysfs/file.c | |||
@@ -410,11 +410,12 @@ int sysfs_add_file(struct sysfs_dirent *dir_sd, const struct attribute *attr, | |||
410 | sysfs_link_sibling(sd); | 410 | sysfs_link_sibling(sd); |
411 | } | 411 | } |
412 | 412 | ||
413 | if (sysfs_addrm_finish(&acxt)) | 413 | if (!sysfs_addrm_finish(&acxt)) { |
414 | return 0; | 414 | sysfs_put(sd); |
415 | return -EEXIST; | ||
416 | } | ||
415 | 417 | ||
416 | sysfs_put(sd); | 418 | return 0; |
417 | return -EEXIST; | ||
418 | } | 419 | } |
419 | 420 | ||
420 | 421 | ||