Commit 38d473f9 authored by Ondrej Zajicek's avatar Ondrej Zajicek Committed by Linus Torvalds

vt8623fb: arkfb: null pointer dereference fix

This patch prevents null pointer dereference in arkfb and vt8623fb.
Signed-off-by: default avatarOndrej Zajicek <santiago@crfreenet.org>
Signed-off-by: default avatarAntonino Daplas <adaplas@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 2d9f95f9
......@@ -1055,9 +1055,10 @@ static int __devinit ark_pci_probe(struct pci_dev *dev, const struct pci_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);
......
......@@ -778,9 +778,10 @@ static int __devinit vt8623_pci_probe(struct pci_dev *dev, const struct pci_devi
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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment