diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-09-22 19:45:55 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-23 10:39:42 -0400 |
commit | 8b2feb10c907b610bf8a739792c6b967c65445b0 (patch) | |
tree | 6bce57c8833f9e8eaaad8ce7b595b01b4889df5a /fs/ncpfs | |
parent | 1b83df308f69a5a3cc59be03bd7fb23e4bcebd8e (diff) |
ncpfs: fix wrong check in __ncp_ioctl()
We want to check for s_inode's existence, not inode's one (inode is always
valid in this function).
This takes care of the following entry from Dan's list:
fs/ncpfs/ioctl.c +445 __ncp_ioctl(180) warning: variable derefenced before check 'inode'
Reported-by: Dan Carpenter <error27@gmail.com>
Cc: Julia Lawall <julia@diku.dk>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Cc: Petr Vandrovec <vandrove@vc.cvut.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/ncpfs')
-rw-r--r-- | fs/ncpfs/ioctl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ncpfs/ioctl.c b/fs/ncpfs/ioctl.c index fa038df63ac8..53a7ed7eb9c6 100644 --- a/fs/ncpfs/ioctl.c +++ b/fs/ncpfs/ioctl.c | |||
@@ -442,7 +442,7 @@ static int __ncp_ioctl(struct inode *inode, struct file *filp, | |||
442 | if (dentry) { | 442 | if (dentry) { |
443 | struct inode* s_inode = dentry->d_inode; | 443 | struct inode* s_inode = dentry->d_inode; |
444 | 444 | ||
445 | if (inode) { | 445 | if (s_inode) { |
446 | NCP_FINFO(s_inode)->volNumber = vnum; | 446 | NCP_FINFO(s_inode)->volNumber = vnum; |
447 | NCP_FINFO(s_inode)->dirEntNum = de; | 447 | NCP_FINFO(s_inode)->dirEntNum = de; |
448 | NCP_FINFO(s_inode)->DosDirNum = dosde; | 448 | NCP_FINFO(s_inode)->DosDirNum = dosde; |