summaryrefslogtreecommitdiff
path: root/drivers/video/tmiofb.c
diff options
context:
space:
mode:
authorAlan Cox <alan@linux.intel.com>2012-07-24 13:43:48 +0100
committerJiri Kosina <jkosina@suse.cz>2012-09-01 08:51:03 -0700
commit40dc23aa82d51147a24f659a7c006ae4bb14009a (patch)
tree5d1fd9e964fec27a6b9ed3155e7e1f8efe1f0a78 /drivers/video/tmiofb.c
parent3fd44cd40c920cb26c2697cea59442cd40cc8227 (diff)
downloadlinux-3.10-40dc23aa82d51147a24f659a7c006ae4bb14009a.tar.gz
linux-3.10-40dc23aa82d51147a24f659a7c006ae4bb14009a.tar.bz2
linux-3.10-40dc23aa82d51147a24f659a7c006ae4bb14009a.zip
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 8e4a446b5ed..b244f060f15 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);