IB/ipath: Calling PTR_ERR() on right variable in create_file()
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 26 Jan 2012 06:15:29 +0000 (09:15 +0300)
committerRoland Dreier <roland@purestorage.com>
Fri, 27 Jan 2012 17:48:27 +0000 (09:48 -0800)
"dentry" is a valid pointer.  "*dentry" was intended.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Mike Marciniszyn <mike.marciniszyn@qlogic.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/hw/ipath/ipath_fs.c

index b7d4216db3c35636ff91734e33d3ad0bcef357b1..a4de9d58e9b4749edda15575ed4c8a4e254678c1 100644 (file)
@@ -89,7 +89,7 @@ static int create_file(const char *name, umode_t mode,
                error = ipathfs_mknod(parent->d_inode, *dentry,
                                      mode, fops, data);
        else
-               error = PTR_ERR(dentry);
+               error = PTR_ERR(*dentry);
        mutex_unlock(&parent->d_inode->i_mutex);
 
        return error;