Skip to content

Commit

Permalink
NFS: Fix a typo in _nfs_display_fhandle
Browse files Browse the repository at this point in the history
The check for 'fh == NULL' needs to come _before_ we dereference
fh.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Mar 6, 2012
1 parent 7e03b7c commit fa68a1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/nfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit fa68a1b

Please sign in to comment.