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>
This commit is contained in:
parent
3fd44cd40c
commit
40dc23aa82
1 changed files with 4 additions and 0 deletions
|
@ -694,6 +694,10 @@ static int __devinit tmiofb_probe(struct platform_device *dev)
|
||||||
dev_err(&dev->dev, "NULL platform data!\n");
|
dev_err(&dev->dev, "NULL platform data!\n");
|
||||||
return -EINVAL;
|
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);
|
info = framebuffer_alloc(sizeof(struct tmiofb_par), &dev->dev);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue