aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/tmiofb.c
diff options
context:
space:
mode:
authorAlan Cox <alan@linux.intel.com>2012-07-24 08:43:48 -0400
committerJiri Kosina <jkosina@suse.cz>2012-09-01 11:51:03 -0400
commit40dc23aa82d51147a24f659a7c006ae4bb14009a (patch)
tree5d1fd9e964fec27a6b9ed3155e7e1f8efe1f0a78 /drivers/video/tmiofb.c
parent3fd44cd40c920cb26c2697cea59442cd40cc8227 (diff)
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)
694 dev_err(&dev->dev, "NULL platform data!\n"); 694 dev_err(&dev->dev, "NULL platform data!\n");
695 return -EINVAL; 695 return -EINVAL;
696 } 696 }
697 if (ccr == NULL || lcr == NULL || vram == NULL || irq < 0) {
698 dev_err(&dev->dev, "missing resources\n");
699 return -EINVAL;
700 }
697 701
698 info = framebuffer_alloc(sizeof(struct tmiofb_par), &dev->dev); 702 info = framebuffer_alloc(sizeof(struct tmiofb_par), &dev->dev);
699 703