diff options
author | Antonino A. Daplas <adaplas@gmail.com> | 2006-03-11 11:27:23 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-11 17:19:35 (GMT) |
commit | 939205b27312b7d7c4c55624ba785e554b39ecbb (patch) | |
tree | 120591e604a08ed56b86b3c6bb86bce4abba7461 /drivers | |
parent | 16afe814a856e271628c5dfb4abbc318ec6b6f5f (diff) | |
download | linux-939205b27312b7d7c4c55624ba785e554b39ecbb.tar.xz |
[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>
Diffstat (limited to 'drivers')
-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 0cf26da..4660428 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 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; |