]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
media: ov5645: add missing of_node_put() in error path
authorAkinobu Mita <akinobu.mita@gmail.com>
Mon, 19 Mar 2018 16:14:17 +0000 (12:14 -0400)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 14 Aug 2018 10:29:35 +0000 (12:29 +0200)
commit54b17a51d33898c9224b4bf125bcebe415a6940e
tree863d96368fa02ff5d76139811c530dc995b7e0e3
parent2739185dd66a2fefdea20b1974bea8738f5c2fed
media: ov5645: add missing of_node_put() in error path

BugLink: http://bugs.launchpad.net/bugs/1783418
[ Upstream commit 06fe932307d58108a11c3e603517dd2a73a57b80 ]

The device node obtained with of_graph_get_next_endpoint() should be
released by calling of_node_put().  But it was not released when
v4l2_fwnode_endpoint_parse() failed.

This change moves the of_node_put() call before the error check and
fixes the issue.

Cc: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Acked-by: Todor Tomov <todor.tomov@linaro.org>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/media/i2c/ov5645.c