summaryrefslogtreecommitdiff
path: root/drivers/net/can
diff options
context:
space:
mode:
authorMarc Kleine-Budde <mkl@pengutronix.de>2020-10-16 21:49:30 +0300
committerMarc Kleine-Budde <mkl@pengutronix.de>2021-01-29 11:31:58 +0300
commitdfe99ba29e6283d0533ca9bf5135c5a6c0f7a952 (patch)
tree81110765508f84f825224a7aa1f8cef546a570b7 /drivers/net/can
parent49ffacbc4cd974bf2765af8640500ed7f1f93bff (diff)
downloadlinux-dfe99ba29e6283d0533ca9bf5135c5a6c0f7a952.tar.xz
can: mcp251xfd: mcp251xfd_chip_clock_enable(): simplify return
This patch simplifies the return of the mcp251xfd_chip_clock_enable() function by direct returning the error. Link: https://lore.kernel.org/r/20210128104644.2982125-8-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can')
-rw-r--r--drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c4
1 files changed, 1 insertions, 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)