From: Trond Myklebust Date: Tue, 6 Mar 2012 15:14:35 +0000 (-0500) Subject: NFS: Fix a typo in _nfs_display_fhandle X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=fa68a1ba1de349f0d1fcc54171b95236efe24148;p=linux-beck.git NFS: Fix a typo in _nfs_display_fhandle The check for 'fh == NULL' needs to come _before_ we dereference fh. Reported-by: Dan Carpenter Signed-off-by: Trond Myklebust --- diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index 99a4f52c14b2..ba03b7908149 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c @@ -1058,7 +1058,7 @@ void _nfs_display_fhandle(const struct nfs_fh *fh, const char *caption) { unsigned short i; - if (fh->size == 0 || fh == NULL) { + if (fh == NULL || fh->size == 0) { printk(KERN_DEFAULT "%s at %p is empty\n", caption, fh); return; }