提交 5a634ae0 编写于 作者: K Kevin Hilman 提交者: Mauro Carvalho Chehab

media: davinci: vpif_capture: fix potential NULL deref

Fix potential NULL pointer dereference in the error path of memory
allocation failure.
Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NKevin Hilman <khilman@baylibre.com>
Acked-by: NSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
上级 e5c50e13
......@@ -1593,9 +1593,11 @@ vpif_capture_get_pdata(struct platform_device *pdev)
}
done:
pdata->asd_sizes[0] = i;
pdata->subdev_count = i;
pdata->card_name = "DA850/OMAP-L138 Video Capture";
if (pdata) {
pdata->asd_sizes[0] = i;
pdata->subdev_count = i;
pdata->card_name = "DA850/OMAP-L138 Video Capture";
}
return pdata;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册