Commit 5a634ae0 authored by Kevin Hilman's avatar Kevin Hilman Committed by 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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarKevin Hilman <khilman@baylibre.com>
Acked-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent e5c50e13
...@@ -1593,9 +1593,11 @@ vpif_capture_get_pdata(struct platform_device *pdev) ...@@ -1593,9 +1593,11 @@ vpif_capture_get_pdata(struct platform_device *pdev)
} }
done: done:
if (pdata) {
pdata->asd_sizes[0] = i; pdata->asd_sizes[0] = i;
pdata->subdev_count = i; pdata->subdev_count = i;
pdata->card_name = "DA850/OMAP-L138 Video Capture"; pdata->card_name = "DA850/OMAP-L138 Video Capture";
}
return pdata; return pdata;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment