Jeff Liu
2014-Jun-17 14:32 UTC
[PATCH 16/24] btrfs: return actual error on btrfs_init_sysfs
From: Jie Liu <jeff.liu@oracle.com> Return the actual error code if call kset_create_and_add() failed Cc: Chris Mason <clm@fb.com> Cc: Josef Bacik <jbacik@fb.com> Signed-off-by: Jie Liu <jeff.liu@oracle.com> --- fs/btrfs/sysfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/btrfs/sysfs.c b/fs/btrfs/sysfs.c index df39458..8f7dfa7 100644 --- a/fs/btrfs/sysfs.c +++ b/fs/btrfs/sysfs.c @@ -705,8 +705,8 @@ int btrfs_init_sysfs(void) int ret; btrfs_kset = kset_create_and_add("btrfs", NULL, fs_kobj); - if (!btrfs_kset) - return -ENOMEM; + if (IS_ERR(btrfs_kset)) + return PTR_ERR(btrfs_kset); ret = btrfs_init_debugfs(); if (ret) -- 1.8.3.2 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html