]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - fs/pstore/inode.c
pstore: d_alloc_name() doesn't return an ERR_PTR
[karo-tx-linux.git] / fs / pstore / inode.c
index 71bf5f4ae84c9a9044be1056e83582b7c72fd74c..6a4123d1849ca13defbdad5be25e08fddf4ce85b 100644 (file)
@@ -345,9 +345,8 @@ int pstore_mkfile(enum pstore_type_id type, char *psname, u64 id, int count,
 
        mutex_lock(&root->d_inode->i_mutex);
 
-       rc = -ENOSPC;
        dentry = d_alloc_name(root, name);
-       if (IS_ERR(dentry))
+       if (!dentry)
                goto fail_lockedalloc;
 
        memcpy(private->data, data, size);