1
0
Fork 0

[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>
hifive-unleashed-5.1
Antonino A. Daplas 2006-03-11 03:27:23 -08:00 committed by Linus Torvalds
parent 16afe814a8
commit 939205b273
1 changed files with 1 additions and 1 deletions

View File

@ -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;