Commit 72b1e36
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: 76e9353 ("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: Pavel Machek <pavel@denx.de>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>1 parent c6564c1 commit 72b1e36
1 file changed
Lines changed: 2 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1640 | 1640 | | |
1641 | 1641 | | |
1642 | 1642 | | |
1643 | | - | |
1644 | | - | |
| 1643 | + | |
1645 | 1644 | | |
1646 | 1645 | | |
1647 | 1646 | | |
| |||
1735 | 1734 | | |
1736 | 1735 | | |
1737 | 1736 | | |
1738 | | - | |
1739 | 1737 | | |
| 1738 | + | |
1740 | 1739 | | |
1741 | 1740 | | |
1742 | 1741 | | |
| |||
0 commit comments