summaryrefslogtreecommitdiff
path: root/drivers/video/tmiofb.c
diff options
context:
space:
mode:
authorAlan Cox <alan@linux.intel.com>2012-07-24 16:43:48 +0400
committerJiri Kosina <jkosina@suse.cz>2012-09-01 19:51:03 +0400
commit40dc23aa82d51147a24f659a7c006ae4bb14009a (patch)
tree5d1fd9e964fec27a6b9ed3155e7e1f8efe1f0a78 /drivers/video/tmiofb.c
parent3fd44cd40c920cb26c2697cea59442cd40cc8227 (diff)
downloadlinux-40dc23aa82d51147a24f659a7c006ae4bb14009a.tar.xz
tmiofb: missing NULL pointer checks
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>
Diffstat (limited to 'drivers/video/tmiofb.c')
-rw-r--r--drivers/video/tmiofb.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/video/tmiofb.c b/drivers/video/tmiofb.c
index 8e4a446b5ed1..b244f060f151 100644
--- a/drivers/video/tmiofb.c
+++ b/drivers/video/tmiofb.c
@@ -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);