can: mcp251xfd: mcp251xfd_chip_start(): fix error handling for mcp251xfd_chip_rx_int_...
authorMarc Kleine-Budde <mkl@pengutronix.de>
Tue, 19 Oct 2021 15:00:04 +0000 (17:00 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Nov 2021 18:17:10 +0000 (19:17 +0100)
[ Upstream commit 69c55f6e7669d46bb40e41f6e2b218428178368a ]

This patch fixes the error handling for mcp251xfd_chip_rx_int_enable().
Instead just returning the error, properly shut down the chip.

Link: https://lore.kernel.org/all/20211106201526.44292-2-mkl@pengutronix.de
Fixes: 55e5b97f003e ("can: mcp25xxfd: add driver for Microchip MCP25xxFD SPI CAN")
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c

index 212fcd1554e4f36e9813c38903a5a5b0d1d6f940..e16dc482f3270b6353462d50a20d09a92461c70c 100644 (file)
@@ -1092,7 +1092,7 @@ static int mcp251xfd_chip_start(struct mcp251xfd_priv *priv)
 
        err = mcp251xfd_chip_rx_int_enable(priv);
        if (err)
-               return err;
+               goto out_chip_stop;
 
        err = mcp251xfd_chip_ecc_init(priv);
        if (err)