# Re: \[PATCH\] pwm: atmel: Simplify using devm functions

- From: Thierry Reding \<hidden\>
- Date: 2023-07-28 07:34:48 
- List: linux-arm-kernel
- Page: https://ratatoskr.run/linux-arm-kernel/2023/07/8837286
- Thread: https://ratatoskr.run/linux-pwm/2023/07/8837137/t.md

```text
On Wed, Jul 19, 2023 at 09:32:13PM +0200, Uwe Kleine-König wrote:
> For all resources used by the driver there is a devm variant to allocate
> these. This makes it unnecessary to implement an error path or a remove
> function.
> 
> While at it also use dev_err_probe() to compact returning an error.
> 
> With the remove callback gone, there is no user of driver data left, so
> the call to platform_set_drvdata() can also be dropped.
> 
> Signed-off-by: Uwe Kleine-König <redacted>
> ---
>  drivers/pwm/pwm-atmel.c | 38 ++++++++------------------------------
>  1 file changed, 8 insertions(+), 30 deletions(-)

Doesn't apply to the for-next branch, please rebase.

Thierry
```
