Skip to content

Commit

Permalink
nfs: testing for null instead of ERR_PTR()
Browse files Browse the repository at this point in the history
nfs_path() returns an ERR_PTR(), it doesn't return null.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
  • Loading branch information
Dan Carpenter authored and Trond Myklebust committed Apr 22, 2010
1 parent 356e76b commit cdd29ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/nfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -2657,7 +2657,7 @@ static void nfs_fix_devname(const struct path *path, struct vfsmount *mnt)
devname = nfs_path(path->mnt->mnt_devname,
path->mnt->mnt_root, path->dentry,
page, PAGE_SIZE);
if (devname == NULL)
if (IS_ERR(devname))
goto out_freepage;
tmp = kstrdup(devname, GFP_KERNEL);
if (tmp == NULL)
Expand Down

0 comments on commit cdd29ec

Please sign in to comment.