Re: [PATCH] softingcs: Fix memleak on registration failure in softingcs_probe

From: Marc Kleine-Budde
Date: Sat Jan 08 2022 - 16:48:03 EST


On 08.01.2022 09:25:51, Miaoqian Lin wrote:
> In case device registration fails during module initialisation, the
> platform device structure needs to be freed using platform_device_put()
> to properly free all resources (e.g. the device name).
>
> Fixes: 0a0b7a5f7a04 ("can: add driver for Softing card")
> Signed-off-by: Miaoqian Lin <linmq006@xxxxxxxxx>

Thanks for your patch, a similar one has already been posted:

| https://lore.kernel.org/all/20211222104843.6105-1-johan@xxxxxxxxxx/

regards,
Marc

--
Pengutronix e.K. | Marc Kleine-Budde |
Embedded Linux | https://www.pengutronix.de |
Vertretung West/Dortmund | Phone: +49-231-2826-924 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |

Attachment: signature.asc
Description: PGP signature