This patch simplifies the return of the mcp251xfd_chip_clock_enable() function by direct returning the error. Signed-off-by: Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx> --- drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c b/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c index 04870a741792..da5e8e416440 100644 --- a/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c +++ b/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c @@ -596,11 +596,9 @@ static int mcp251xfd_chip_clock_enable(const struct mcp251xfd_priv *priv) "Timeout waiting for Oscillator Ready (osc=0x%08x, osc_reference=0x%08x)\n", osc, osc_reference); return -ETIMEDOUT; - } else if (err) { - return err; } - return 0; + return err; } static int mcp251xfd_chip_softreset_do(const struct mcp251xfd_priv *priv) -- 2.29.2