Skip to content
Commit 72b1e360 authored by Lad Prabhakar's avatar Lad Prabhakar Committed by Marc Kleine-Budde
Browse files

can: rcar_canfd: rcar_canfd_channel_probe(): make sure we free CAN network device

Make sure we free CAN network device in the error path. There are
several jumps to fail label after allocating the CAN network device
successfully. This patch places the free_candev() under fail label so
that in failure path a jump to fail label frees the CAN network
device.

Fixes: 76e9353a ("can: rcar_canfd: Add support for RZ/G2L family")
Link: https://lore.kernel.org/all/20220106114801.20563-1-prabhakar.mahadev-lad.rj@bp.renesas.com


Reported-by: default avatarPavel Machek <pavel@denx.de>
Signed-off-by: default avatarLad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: default avatarKieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
parent c6564c13
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment