Commit cdd29ecf authored by Dan Carpenter's avatar Dan Carpenter Committed by Trond Myklebust

nfs: testing for null instead of ERR_PTR()

nfs_path() returns an ERR_PTR(), it doesn't return null.
Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent 356e76b8
...@@ -2657,7 +2657,7 @@ static void nfs_fix_devname(const struct path *path, struct vfsmount *mnt) ...@@ -2657,7 +2657,7 @@ static void nfs_fix_devname(const struct path *path, struct vfsmount *mnt)
devname = nfs_path(path->mnt->mnt_devname, devname = nfs_path(path->mnt->mnt_devname,
path->mnt->mnt_root, path->dentry, path->mnt->mnt_root, path->dentry,
page, PAGE_SIZE); page, PAGE_SIZE);
if (devname == NULL) if (IS_ERR(devname))
goto out_freepage; goto out_freepage;
tmp = kstrdup(devname, GFP_KERNEL); tmp = kstrdup(devname, GFP_KERNEL);
if (tmp == NULL) if (tmp == NULL)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment