[media] v4l: omap3isp: Fix OF node double put when parsing OF graph
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Thu, 29 Sep 2016 08:41:24 +0000 (05:41 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Wed, 16 Nov 2016 18:13:39 +0000 (16:13 -0200)
commit04b96d1a6954309eb562ef2736c019b3cf2dad2a
tree4fe7fa380db0e477bc6c7aec9a5427488fed4315
parent03c47aaeffec8e91ff4207d4814061a24fe51afb
[media] v4l: omap3isp: Fix OF node double put when parsing OF graph

When parsing the graph the driver loops over all endpoints using
of_graph_get_next_endpoint(). The function handles reference counting of
the passed and returned nodes, so the returned node's reference count
must not be decreased manually in the normal path.

Move the offending of_node_put() call to the error path that requires
manual reference count handling.

Reported-by: H. Nikolaus Schaller <hns@goldelico.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/platform/omap3isp/isp.c