Home
last modified time | relevance | path

Searched hist:c4cf7aa57eb83b108d2d9c6c37c143388fee2a4d (Results 1 – 1 of 1) sorted by relevance

/linux/drivers/pwm/
H A Dpwm-omap-dmtimer.cc4cf7aa57eb83b108d2d9c6c37c143388fee2a4d Mon Nov 11 09:03:55 UTC 2019 Uwe Kleine-König <u.kleine-koenig@pengutronix.de> pwm: omap-dmtimer: Simplify error handling

Instead of doing error handling in the middle of ->probe(), move error
handling and freeing the reference to timer to the end.

This fixes a resource leak as dm_timer wasn't freed when allocating
*omap failed.

Implementation note: The put: label was never reached without a goto and
ret being unequal to 0, so the removed return statement is fine.

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>