diff options
author | Alan Cox <alan@linux.intel.com> | 2012-07-24 13:43:48 +0100 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2012-09-01 08:51:03 -0700 |
commit | 40dc23aa82d51147a24f659a7c006ae4bb14009a (patch) | |
tree | 5d1fd9e964fec27a6b9ed3155e7e1f8efe1f0a78 /drivers/video | |
parent | 3fd44cd40c920cb26c2697cea59442cd40cc8227 (diff) | |
download | linux-stable-40dc23aa82d51147a24f659a7c006ae4bb14009a.tar.gz linux-stable-40dc23aa82d51147a24f659a7c006ae4bb14009a.tar.bz2 linux-stable-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')
-rw-r--r-- | drivers/video/tmiofb.c | 4 |
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); |