From: Dan Carpenter Date: Thu, 26 Jan 2012 06:15:29 +0000 (+0300) Subject: IB/ipath: Calling PTR_ERR() on right variable in create_file() X-Git-Tag: upstream/snapshot3+hdmi~8213^2^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ef5352875a12a0a45be8bca29fc218a94786d920;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git IB/ipath: Calling PTR_ERR() on right variable in create_file() "dentry" is a valid pointer. "*dentry" was intended. Signed-off-by: Dan Carpenter Acked-by: Mike Marciniszyn Signed-off-by: Roland Dreier --- diff --git a/drivers/infiniband/hw/ipath/ipath_fs.c b/drivers/infiniband/hw/ipath/ipath_fs.c index b7d4216..a4de9d5 100644 --- a/drivers/infiniband/hw/ipath/ipath_fs.c +++ b/drivers/infiniband/hw/ipath/ipath_fs.c @@ -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;