diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2007-06-01 03:46:43 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-06-01 11:18:28 -0400 |
commit | 38d473f99575f57f5911c7c94922fcf0b0a58b8d (patch) | |
tree | f0d9f967ac96a1a02658f6bcd399407b7e615fb7 /drivers | |
parent | 2d9f95f916e926195a57b76064586ea0b1985848 (diff) |
vt8623fb: arkfb: null pointer dereference fix
This patch prevents null pointer dereference in arkfb and vt8623fb.
Signed-off-by: Ondrej Zajicek <santiago@crfreenet.org>
Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/video/arkfb.c | 3 | ||||
-rw-r--r-- | drivers/video/vt8623fb.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/drivers/video/arkfb.c b/drivers/video/arkfb.c index ba6fede5c466..8a1b07c74394 100644 --- a/drivers/video/arkfb.c +++ b/drivers/video/arkfb.c | |||
@@ -1055,9 +1055,10 @@ err_enable_device: | |||
1055 | static void __devexit ark_pci_remove(struct pci_dev *dev) | 1055 | static void __devexit ark_pci_remove(struct pci_dev *dev) |
1056 | { | 1056 | { |
1057 | struct fb_info *info = pci_get_drvdata(dev); | 1057 | struct fb_info *info = pci_get_drvdata(dev); |
1058 | struct arkfb_info *par = info->par; | ||
1059 | 1058 | ||
1060 | if (info) { | 1059 | if (info) { |
1060 | struct arkfb_info *par = info->par; | ||
1061 | |||
1061 | #ifdef CONFIG_MTRR | 1062 | #ifdef CONFIG_MTRR |
1062 | if (par->mtrr_reg >= 0) { | 1063 | if (par->mtrr_reg >= 0) { |
1063 | mtrr_del(par->mtrr_reg, 0, 0); | 1064 | mtrr_del(par->mtrr_reg, 0, 0); |
diff --git a/drivers/video/vt8623fb.c b/drivers/video/vt8623fb.c index 5e9755e464a1..30c0b948852b 100644 --- a/drivers/video/vt8623fb.c +++ b/drivers/video/vt8623fb.c | |||
@@ -778,9 +778,10 @@ err_enable_device: | |||
778 | static void __devexit vt8623_pci_remove(struct pci_dev *dev) | 778 | static void __devexit vt8623_pci_remove(struct pci_dev *dev) |
779 | { | 779 | { |
780 | struct fb_info *info = pci_get_drvdata(dev); | 780 | struct fb_info *info = pci_get_drvdata(dev); |
781 | struct vt8623fb_info *par = info->par; | ||
782 | 781 | ||
783 | if (info) { | 782 | if (info) { |
783 | struct vt8623fb_info *par = info->par; | ||
784 | |||
784 | #ifdef CONFIG_MTRR | 785 | #ifdef CONFIG_MTRR |
785 | if (par->mtrr_reg >= 0) { | 786 | if (par->mtrr_reg >= 0) { |
786 | mtrr_del(par->mtrr_reg, 0, 0); | 787 | mtrr_del(par->mtrr_reg, 0, 0); |