]> git.baikalelectronics.ru Git - kernel.git/commit
media: i2c: tvp5150: Add of_node_put() before goto
authorNishka Dasgupta <nishkadg.linux@gmail.com>
Tue, 9 Jul 2019 17:26:40 +0000 (14:26 -0300)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Tue, 13 Aug 2019 14:50:04 +0000 (11:50 -0300)
commit35ef155db997fc3917cd7d4079ebbe70b1868def
treee967b2c30669ab7fbfec9825d6cd7f114183b28e
parent894d03aba674340d8ca600be342791105a087c0c
media: i2c: tvp5150: Add of_node_put() before goto

Each iteration of for_each_available_child_of_node puts the previous
node, but in the case of a goto from the middle of the loop, there is
no put, thus causing a memory leak. Hence add an of_node_put before the
goto in four places.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/i2c/tvp5150.c