Browse Source

nfs: testing for null instead of ERR_PTR()

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>
Dan Carpenter 15 năm trước cách đây
mục cha
commit
cdd29ecfcb
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      fs/nfs/super.c

+ 1 - 1
fs/nfs/super.c

@@ -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)