Commit 168f2e14 authored by Tony Luck's avatar Tony Luck

pstore: fix build warning for unused return value from sysfs_create_file

fs/pstore/inode.c: In function 'init_pstore_fs':
fs/pstore/inode.c:266: warning: ignoring return value of 'sysfs_create_file', declared with attribute warn_unused_result
Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
parent 0bb77c46
...@@ -256,23 +256,28 @@ static struct file_system_type pstore_fs_type = { ...@@ -256,23 +256,28 @@ static struct file_system_type pstore_fs_type = {
static int __init init_pstore_fs(void) static int __init init_pstore_fs(void)
{ {
int ret = 0; int rc = 0;
struct kobject *pstorefs_kobj; struct kobject *pstorefs_kobj;
pstorefs_kobj = kobject_create_and_add("pstore", fs_kobj); pstorefs_kobj = kobject_create_and_add("pstore", fs_kobj);
if (!pstorefs_kobj) if (!pstorefs_kobj) {
return -ENOMEM; rc = -ENOMEM;
goto done;
}
sysfs_create_file(pstorefs_kobj, &pstore_kmsg_bytes_attr.attr); rc = sysfs_create_file(pstorefs_kobj, &pstore_kmsg_bytes_attr.attr);
if (rc)
goto done1;
ret = register_filesystem(&pstore_fs_type); rc = register_filesystem(&pstore_fs_type);
if (rc == 0)
goto done;
if (ret) {
sysfs_remove_file(pstorefs_kobj, &pstore_kmsg_bytes_attr.attr); sysfs_remove_file(pstorefs_kobj, &pstore_kmsg_bytes_attr.attr);
done1:
kobject_put(pstorefs_kobj); kobject_put(pstorefs_kobj);
} done:
return rc;
return ret;
} }
module_init(init_pstore_fs) module_init(init_pstore_fs)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment