media: tc358743: release device_node in tc358743_probe_of()
authorAlexey Khoroshilov <khoroshilov@ispras.ru>
Fri, 25 May 2018 21:54:00 +0000 (17:54 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Thu, 28 Jun 2018 10:38:43 +0000 (06:38 -0400)
commit64bac6916ef7d9cc57367893aea1544fcad91b9b
treeb08bf0a1bbd160b47c91a22ed8918d48a0d4245a
parent9fab166a3e8f9e071de3418d27ffd03cdba2e9df
media: tc358743: release device_node in tc358743_probe_of()

of_graph_get_next_endpoint() returns device_node with refcnt increased,
but these is no of_node_put() for it.

The patch adds one on error and normal paths.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Reviewed-by: Nicholas Mc Guire <der.herr@hofr.at>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/i2c/tc358743.c