media: stm32-dcmi: add mandatory of_node_put() in success path
authorNicholas Mc Guire <hofrat@osadl.org>
Tue, 12 Jun 2018 17:22:18 +0000 (13:22 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Thu, 28 Jun 2018 11:49:06 +0000 (07:49 -0400)
commitc2ee2243ce3763fef8da097851b2c07b73e18cdb
treeb42f5fcc3f6f66c14c76b0d67e35c3e729753ff1
parentf8eb8e5c1f31f059677a80e0a902e64065695fa8
media: stm32-dcmi: add mandatory of_node_put() in success path

The endpoint allocated by of_graph_get_next_endpoint() needs an of_node_put()
in both error and success path. As  ep  is not used the refcount decrement
can be right after the last use of  ep.

Fixes: commit 37404f91ef8b ("[media] stm32-dcmi: STM32 DCMI camera interface driver")
Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/platform/stm32/stm32-dcmi.c