mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
[PATCH] drivers/video/s3fb.c: fix a use-before-check
NULL checks should be before the first dereference. Spotted by the Coverity checker. Signed-off-by: Adrian Bunk <[email protected]> Acked-by: Ondrej Zajicek <[email protected]> Cc: "Antonino A. Daplas" <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
fffda91e2e
commit
47ebea8351
1 changed files with 2 additions and 1 deletions
|
|
@ -1000,11 +1000,12 @@ err_enable_device:
|
|||
static void __devexit s3_pci_remove(struct pci_dev *dev)
|
||||
{
|
||||
struct fb_info *info = pci_get_drvdata(dev);
|
||||
struct s3fb_info *par = info->par;
|
||||
|
||||
if (info) {
|
||||
|
||||
#ifdef CONFIG_MTRR
|
||||
struct s3fb_info *par = info->par;
|
||||
|
||||
if (par->mtrr_reg >= 0) {
|
||||
mtrr_del(par->mtrr_reg, 0, 0);
|
||||
par->mtrr_reg = -1;
|
||||
|
|
|
|||
Loading…
Reference in a new issue