pwm: omap-dmtimer: put_device() after of_find_device_by_node()
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Mon, 11 Nov 2019 09:03:56 +0000 (10:03 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Mar 2020 15:43:49 +0000 (16:43 +0100)
commitf68b6a015a811ffc072d61f3ba1ba32bbc018612
treef249168b826efd3194e826a72a202ea95cc61028
parent1fabae5c846f2c14f98f7e96228caa0e871cf922
pwm: omap-dmtimer: put_device() after of_find_device_by_node()

commit c7cb3a1dd53f63c64fb2b567d0be130b92a44d91 upstream.

This was found by coccicheck:

drivers/pwm/pwm-omap-dmtimer.c:304:2-8: ERROR: missing put_device;
call of_find_device_by_node on line 255, but without a corresponding
object release within this function.

Reported-by: Markus Elfring <elfring@users.sourceforge.net>
Fixes: 6604c6556db9 ("pwm: Add PWM driver for OMAP using dual-mode timers")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/pwm/pwm-omap-dmtimer.c