Skip to content

Commit 4376ea4

Browse files
can: mcp251xfd: mcp251xfd_probe(): add missing can_rx_offload_del() in error path
This patch adds the missing can_rx_offload_del(), that must be called if mcp251xfd_register() fails. Fixes: 55e5b97 ("can: mcp25xxfd: add driver for Microchip MCP25xxFD SPI CAN") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
1 parent 4cc7faa commit 4376ea4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2986,10 +2986,12 @@ static int mcp251xfd_probe(struct spi_device *spi)
29862986

29872987
err = mcp251xfd_register(priv);
29882988
if (err)
2989-
goto out_free_candev;
2989+
goto out_can_rx_offload_del;
29902990

29912991
return 0;
29922992

2993+
out_can_rx_offload_del:
2994+
can_rx_offload_del(&priv->offload);
29932995
out_free_candev:
29942996
spi->max_speed_hz = priv->spi_max_speed_hz_orig;
29952997

0 commit comments

Comments
 (0)