diff options
author | Antonino A. Daplas <adaplas@gmail.com> | 2006-03-11 06:27:23 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-11 12:19:35 -0500 |
commit | 939205b27312b7d7c4c55624ba785e554b39ecbb (patch) | |
tree | 120591e604a08ed56b86b3c6bb86bce4abba7461 | |
parent | 16afe814a856e271628c5dfb4abbc318ec6b6f5f (diff) |
[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>
-rw-r--r-- | drivers/video/arcfb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/video/arcfb.c b/drivers/video/arcfb.c index 0cf26da75b6d..466042808daf 100644 --- a/drivers/video/arcfb.c +++ b/drivers/video/arcfb.c | |||
@@ -459,11 +459,11 @@ static ssize_t arcfb_write(struct file *file, const char __user *buf, size_t cou | |||
459 | inode = file->f_dentry->d_inode; | 459 | inode = file->f_dentry->d_inode; |
460 | fbidx = iminor(inode); | 460 | fbidx = iminor(inode); |
461 | info = registered_fb[fbidx]; | 461 | info = registered_fb[fbidx]; |
462 | par = info->par; | ||
463 | 462 | ||
464 | if (!info || !info->screen_base) | 463 | if (!info || !info->screen_base) |
465 | return -ENODEV; | 464 | return -ENODEV; |
466 | 465 | ||
466 | par = info->par; | ||
467 | xres = info->var.xres; | 467 | xres = info->var.xres; |
468 | fbmemlength = (xres * info->var.yres)/8; | 468 | fbmemlength = (xres * info->var.yres)/8; |
469 | 469 | ||