Skip to content

Commit

Permalink
tmiofb: missing NULL pointer checks
Browse files Browse the repository at this point in the history
Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=44471
Reported-by: <rucsoftsec@gmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
  • Loading branch information
Alan Cox authored and Jiri Kosina committed Sep 1, 2012
1 parent 3fd44cd commit 40dc23a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/video/tmiofb.c
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,10 @@ static int __devinit tmiofb_probe(struct platform_device *dev)
dev_err(&dev->dev, "NULL platform data!\n");
return -EINVAL;
}
if (ccr == NULL || lcr == NULL || vram == NULL || irq < 0) {
dev_err(&dev->dev, "missing resources\n");
return -EINVAL;
}

info = framebuffer_alloc(sizeof(struct tmiofb_par), &dev->dev);

Expand Down

0 comments on commit 40dc23a

Please sign in to comment.