[PATCH] arcfb: Fix dereference before NULL check
info->par is dereferenced before info is checked for NULL. Fix. Coverity Bug 833 Signed-off-by: Antonino Daplas <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
16afe814a8
commit
939205b273
1 changed files with 1 additions and 1 deletions
|
@ -459,11 +459,11 @@ static ssize_t arcfb_write(struct file *file, const char __user *buf, size_t cou
|
|||
inode = file->f_dentry->d_inode;
|
||||
fbidx = iminor(inode);
|
||||
info = registered_fb[fbidx];
|
||||
par = info->par;
|
||||
|
||||
if (!info || !info->screen_base)
|
||||
return -ENODEV;
|
||||
|
||||
par = info->par;
|
||||
xres = info->var.xres;
|
||||
fbmemlength = (xres * info->var.yres)/8;
|
||||
|
||||
|
|
Loading…
Reference in a new issue