mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
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 <[email protected]> Cc: Julia Lawall <[email protected]> Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]> Cc: Petr Vandrovec <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
1b83df308f
commit
8b2feb10c9
1 changed files with 1 additions and 1 deletions
|
|
@ -442,7 +442,7 @@ static int __ncp_ioctl(struct inode *inode, struct file *filp,
|
|||
if (dentry) {
|
||||
struct inode* s_inode = dentry->d_inode;
|
||||
|
||||
if (inode) {
|
||||
if (s_inode) {
|
||||
NCP_FINFO(s_inode)->volNumber = vnum;
|
||||
NCP_FINFO(s_inode)->dirEntNum = de;
|
||||
NCP_FINFO(s_inode)->DosDirNum = dosde;
|
||||
|
|
|
|||
Loading…
Reference in a new issue