Commit 4376ea42 authored by Marc Kleine-Budde's avatar Marc Kleine-Budde

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: 55e5b97f ("can: mcp25xxfd: add driver for Microchip MCP25xxFD SPI CAN")
Link: https://lore.kernel.org/r/20210504091838.1109047-1-mkl@pengutronix.deSigned-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
parent 4cc7faa4
...@@ -2986,10 +2986,12 @@ static int mcp251xfd_probe(struct spi_device *spi) ...@@ -2986,10 +2986,12 @@ static int mcp251xfd_probe(struct spi_device *spi)
err = mcp251xfd_register(priv); err = mcp251xfd_register(priv);
if (err) if (err)
goto out_free_candev; goto out_can_rx_offload_del;
return 0; return 0;
out_can_rx_offload_del:
can_rx_offload_del(&priv->offload);
out_free_candev: out_free_candev:
spi->max_speed_hz = priv->spi_max_speed_hz_orig; spi->max_speed_hz = priv->spi_max_speed_hz_orig;
......
Markdown is supported
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