Skip to contentSkip to conversation

Fixes for vt8623fb and arkfb drivers

PATCH Ondrej Zajicek 1 participant 1 message May 19, 2007 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

This patch prevents null pointer dereference in arkfb and vt8623fb.

It is against linux-2.6.22-rc2

---

drivers/video/arkfb.c +2 -1
diff -uprN -X linux-2.6.22-rc2/Documentation/dontdiff linux-2.6.22-rc2/drivers/video/arkfb.c linux-2.6.22-rc2-fixed/drivers/video/arkfb.c
@@ -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);
drivers/video/vt8623fb.c +2 -1
diff -uprN -X linux-2.6.22-rc2/Documentation/dontdiff linux-2.6.22-rc2/drivers/video/vt8623fb.c linux-2.6.22-rc2-fixed/drivers/video/vt8623fb.c
@@ -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);
Signature · 11 lines
Elen sila lumenn' omentielvo

Ondrej 'SanTiago' Zajicek (email: [email protected], jabber: [email protected])
OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net)
"To err is human -- to blame it on a computer is even more so."

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/