diff options
author | Tony Luck <tony.luck@intel.com> | 2011-01-06 19:58:58 -0500 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2011-01-06 19:58:58 -0500 |
commit | 168f2e14319aba3125946649604e858cbae85be6 (patch) | |
tree | 16a811b09a607ccb4e8de13da744b7167346ab8e /fs/pstore | |
parent | 0bb77c465f02e8281e24b9f02e7dc8a7e2b81ee2 (diff) |
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: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'fs/pstore')
-rw-r--r-- | fs/pstore/inode.c | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/fs/pstore/inode.c b/fs/pstore/inode.c index 0e806aafe857..549d245d0b42 100644 --- a/fs/pstore/inode.c +++ b/fs/pstore/inode.c | |||
@@ -256,23 +256,28 @@ static struct file_system_type pstore_fs_type = { | |||
256 | 256 | ||
257 | static int __init init_pstore_fs(void) | 257 | static int __init init_pstore_fs(void) |
258 | { | 258 | { |
259 | int ret = 0; | 259 | int rc = 0; |
260 | struct kobject *pstorefs_kobj; | 260 | struct kobject *pstorefs_kobj; |
261 | 261 | ||
262 | pstorefs_kobj = kobject_create_and_add("pstore", fs_kobj); | 262 | pstorefs_kobj = kobject_create_and_add("pstore", fs_kobj); |
263 | if (!pstorefs_kobj) | 263 | if (!pstorefs_kobj) { |
264 | return -ENOMEM; | 264 | rc = -ENOMEM; |
265 | goto done; | ||
266 | } | ||
265 | 267 | ||
266 | sysfs_create_file(pstorefs_kobj, &pstore_kmsg_bytes_attr.attr); | 268 | rc = sysfs_create_file(pstorefs_kobj, &pstore_kmsg_bytes_attr.attr); |
269 | if (rc) | ||
270 | goto done1; | ||
267 | 271 | ||
268 | ret = register_filesystem(&pstore_fs_type); | 272 | rc = register_filesystem(&pstore_fs_type); |
273 | if (rc == 0) | ||
274 | goto done; | ||
269 | 275 | ||
270 | if (ret) { | 276 | sysfs_remove_file(pstorefs_kobj, &pstore_kmsg_bytes_attr.attr); |
271 | sysfs_remove_file(pstorefs_kobj, &pstore_kmsg_bytes_attr.attr); | 277 | done1: |
272 | kobject_put(pstorefs_kobj); | 278 | kobject_put(pstorefs_kobj); |
273 | } | 279 | done: |
274 | 280 | return rc; | |
275 | return ret; | ||
276 | } | 281 | } |
277 | module_init(init_pstore_fs) | 282 | module_init(init_pstore_fs) |
278 | 283 | ||