From: Dan Carpenter Date: Thu, 22 Apr 2010 19:35:56 +0000 (-0400) Subject: nfs: testing for null instead of ERR_PTR() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=cdd29ecfcb9554132cd94b82ae8b69ba37adb3b5;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git nfs: testing for null instead of ERR_PTR() nfs_path() returns an ERR_PTR(), it doesn't return null. Signed-off-by: Dan Carpenter Signed-off-by: Trond Myklebust --- diff --git a/fs/nfs/super.c b/fs/nfs/super.c index e01637240ee..f9327bbaf46 100644 --- a/fs/nfs/super.c +++ b/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)