Skip to content

Commit dfe99ba

Browse files
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/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
1 parent 49ffacb commit dfe99ba

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -596,11 +596,9 @@ static int mcp251xfd_chip_clock_enable(const struct mcp251xfd_priv *priv)
596596
"Timeout waiting for Oscillator Ready (osc=0x%08x, osc_reference=0x%08x)\n",
597597
osc, osc_reference);
598598
return -ETIMEDOUT;
599-
} else if (err) {
600-
return err;
601599
}
602600

603-
return 0;
601+
return err;
604602
}
605603

606604
static int mcp251xfd_chip_softreset_do(const struct mcp251xfd_priv *priv)

0 commit comments

Comments
 (0)