Uwe Kleine-König a3536e5589 pwm: omap-dmtimer: Simplify error handling
[ Upstream commit c4cf7aa57eb83b108d2d9c6c37c143388fee2a4d ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-02-24 08:36:29 +01:00
..
2019-09-27 12:19:47 -07:00
2019-09-21 01:15:48 +02:00
2019-05-09 17:09:54 +02:00
2019-09-27 12:19:47 -07:00
2019-01-16 08:45:33 +01:00
2019-07-09 08:57:45 -07:00