Re: [PATCH] can: at91_can: fix an error handle in at91_can_probe()

From: Marc Kleine-Budde

Date: Sun Jan 25 2026 - 15:32:10 EST


On 25.01.2026 20:09:47, Haoxiang Li wrote:
> In at91_can_probe(), if devm_phy_optional_get() fails,
> the memory allocated by alloc_candev() should be freed.
> Modify the goto label to do so.
>
> Fixes: 3ecc09856afb ("can: at91_can: add CAN transceiver support")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Haoxiang Li <lihaoxiang@xxxxxxxxxxxxxxxx>

A similar patch has just been reported, see:
https://lore.kernel.org/all/20260122114128.643752-1-zilin@xxxxxxxxxx/

Thanks,
Marc

--
Pengutronix e.K. | Marc Kleine-Budde |
Embedded Linux | https://www.pengutronix.de |
Vertretung Nürnberg | Phone: +49-5121-206917-129 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |

Attachment: signature.asc
Description: PGP signature