vt8623fb: arkfb: null pointer dereference fix
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / drivers / video / arkfb.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);