Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5a634ae0 authored by Kevin Hilman's avatar Kevin Hilman Committed by Mauro Carvalho Chehab
Browse files

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
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -1593,9 +1593,11 @@ vpif_capture_get_pdata(struct platform_device *pdev)
	}

done:
	if (pdata) {
		pdata->asd_sizes[0] = i;
		pdata->subdev_count = i;
		pdata->card_name = "DA850/OMAP-L138 Video Capture";
	}

	return pdata;
}