提交 38d473f9 编写于 作者: O Ondrej Zajicek 提交者: Linus Torvalds

vt8623fb: arkfb: null pointer dereference fix

This patch prevents null pointer dereference in arkfb and vt8623fb.
Signed-off-by: NOndrej Zajicek <santiago@crfreenet.org>
Signed-off-by: NAntonino Daplas <adaplas@gmail.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册