提交 07472640 编写于 作者: D Dan Carpenter 提交者: Thierry Reding

pwm: omap-dmtimer: Potential NULL dereference on error

"omap" is NULL so we can't dereference it.
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
上级 36d5be4b
......@@ -243,7 +243,7 @@ static int pwm_omap_dmtimer_probe(struct platform_device *pdev)
omap = devm_kzalloc(&pdev->dev, sizeof(*omap), GFP_KERNEL);
if (!omap) {
omap->pdata->free(dm_timer);
pdata->free(dm_timer);
return -ENOMEM;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册