diff options
-rw-r--r-- | fs/pstore/inode.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/pstore/inode.c b/fs/pstore/inode.c index 71bf5f4ae84c..6a4123d1849c 100644 --- a/fs/pstore/inode.c +++ b/fs/pstore/inode.c | |||
@@ -345,9 +345,8 @@ int pstore_mkfile(enum pstore_type_id type, char *psname, u64 id, int count, | |||
345 | 345 | ||
346 | mutex_lock(&root->d_inode->i_mutex); | 346 | mutex_lock(&root->d_inode->i_mutex); |
347 | 347 | ||
348 | rc = -ENOSPC; | ||
349 | dentry = d_alloc_name(root, name); | 348 | dentry = d_alloc_name(root, name); |
350 | if (IS_ERR(dentry)) | 349 | if (!dentry) |
351 | goto fail_lockedalloc; | 350 | goto fail_lockedalloc; |
352 | 351 | ||
353 | memcpy(private->data, data, size); | 352 | memcpy(private->data, data, size); |