[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>

authored by Antonino A. Daplas and committed by Linus Torvalds 939205b2 16afe814

+1 -1
+1 -1
drivers/video/arcfb.c
··· 459 inode = file->f_dentry->d_inode; 460 fbidx = iminor(inode); 461 info = registered_fb[fbidx]; 462 - par = info->par; 463 464 if (!info || !info->screen_base) 465 return -ENODEV; 466 467 xres = info->var.xres; 468 fbmemlength = (xres * info->var.yres)/8; 469
··· 459 inode = file->f_dentry->d_inode; 460 fbidx = iminor(inode); 461 info = registered_fb[fbidx]; 462 463 if (!info || !info->screen_base) 464 return -ENODEV; 465 466 + par = info->par; 467 xres = info->var.xres; 468 fbmemlength = (xres * info->var.yres)/8; 469