Skip to content

Commit

Permalink
[PATCH] arcfb: Fix dereference before NULL check
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Antonino A. Daplas authored and Linus Torvalds committed Mar 11, 2006
1 parent 16afe81 commit 939205b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/video/arcfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 939205b

Please sign in to comment.