提交 9ad285d6 编写于 作者: S Samuel Ortiz

mfd: Check t7l66 platform_data pointer

We should check for pdata being not NULL before dereferencing it.
Reported-by: NDan Carpenter <error27@gmail.com>
Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
上级 c5617b20
......@@ -318,6 +318,9 @@ static int t7l66xb_probe(struct platform_device *dev)
struct resource *iomem, *rscr;
int ret;
if (pdata == NULL)
return -EINVAL;
iomem = platform_get_resource(dev, IORESOURCE_MEM, 0);
if (!iomem)
return -EINVAL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册