diff options
| author | Uwe Kleine-König <[email protected]> | 2019-11-11 09:03:55 +0000 |
|---|---|---|
| committer | Thierry Reding <[email protected]> | 2020-01-20 11:31:19 +0000 |
| commit | c4cf7aa57eb83b108d2d9c6c37c143388fee2a4d (patch) | |
| tree | cd24641ffe54ed6a4c7e8c19a9bf1bd46dbc161a /drivers/pwm/pwm-imx27.c | |
| parent | pwm: omap-dmtimer: Remove PWM chip in .remove before making it unfunctional (diff) | |
| download | kernel-c4cf7aa57eb83b108d2d9c6c37c143388fee2a4d.tar.gz kernel-c4cf7aa57eb83b108d2d9c6c37c143388fee2a4d.zip | |
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 <[email protected]>
Signed-off-by: Thierry Reding <[email protected]>
Diffstat (limited to 'drivers/pwm/pwm-imx27.c')
0 files changed, 0 insertions, 0 deletions
