]> Git Repo - linux.git/commitdiff
vt8623fb: arkfb: null pointer dereference fix
authorOndrej Zajicek <[email protected]>
Fri, 1 Jun 2007 07:46:43 +0000 (00:46 -0700)
committerLinus Torvalds <[email protected]>
Fri, 1 Jun 2007 15:18:28 +0000 (08:18 -0700)
This patch prevents null pointer dereference in arkfb and vt8623fb.

Signed-off-by: Ondrej Zajicek <[email protected]>
Signed-off-by: Antonino Daplas <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
drivers/video/arkfb.c
drivers/video/vt8623fb.c

index ba6fede5c466f3c6eaa5742ac35ae0ebe99f8232..8a1b07c74394d35f12c62ab25129ca762c23e045 100644 (file)
@@ -1055,9 +1055,10 @@ err_enable_device:
 static void __devexit ark_pci_remove(struct pci_dev *dev)
 {
        struct fb_info *info = pci_get_drvdata(dev);
-       struct arkfb_info *par = info->par;
 
        if (info) {
+               struct arkfb_info *par = info->par;
+
 #ifdef CONFIG_MTRR
                if (par->mtrr_reg >= 0) {
                        mtrr_del(par->mtrr_reg, 0, 0);
index 5e9755e464a15fcacde5393247a01740d54cd4b7..30c0b948852b06b473a8e87705bcbd87f726fb70 100644 (file)
@@ -778,9 +778,10 @@ err_enable_device:
 static void __devexit vt8623_pci_remove(struct pci_dev *dev)
 {
        struct fb_info *info = pci_get_drvdata(dev);
-       struct vt8623fb_info *par = info->par;
 
        if (info) {
+               struct vt8623fb_info *par = info->par;
+
 #ifdef CONFIG_MTRR
                if (par->mtrr_reg >= 0) {
                        mtrr_del(par->mtrr_reg, 0, 0);
This page took 0.065011 seconds and 4 git commands to generate.