media: v4l: fwnode: Make v4l2_fwnode_endpoint_free() safer
authorSakari Ailus <sakari.ailus@linux.intel.com>
Mon, 23 Sep 2019 09:09:46 +0000 (06:09 -0300)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Tue, 1 Oct 2019 20:32:55 +0000 (17:32 -0300)
commit355047f411c0516533b8c9c96eb6cea252bc78f0
tree5c522cca920fe894cfaa0f3b9cd145202ea2be47
parent8f4ac27af9d61776ee7218175ce300c2cb6a7121
media: v4l: fwnode: Make v4l2_fwnode_endpoint_free() safer

Assign vep->link_frequencies to NULL after releasing its memory. Without
this change, multiple calls to v4l2_fwnode_endpoint_free() would result in
double kfree calls.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/v4l2-core/v4l2-fwnode.c