Skip to content

Commit

Permalink
can: tcan4x5x: tcan4x5x_can_probe(): add missing error checking for d…
Browse files Browse the repository at this point in the history
…evm_regmap_init()

This patch adds the missing error checking when initializing the regmap
interface fails.

Fixes: 5443c22 ("can: tcan4x5x: Add tcan4x5x driver to the kernel")
Cc: Dan Murphy <dmurphy@ti.com>
Link: http://lore.kernel.org/r/20201019154233.1262589-7-mkl@pengutronix.de
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
  • Loading branch information
Marc Kleine-Budde committed Nov 15, 2020
1 parent 3fcce13 commit 1ff203b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/net/can/m_can/tcan4x5x.c
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,10 @@ static int tcan4x5x_can_probe(struct spi_device *spi)

priv->regmap = devm_regmap_init(&spi->dev, &tcan4x5x_bus,
&spi->dev, &tcan4x5x_regmap);
if (IS_ERR(priv->regmap)) {
ret = PTR_ERR(priv->regmap);
goto out_clk;
}

ret = tcan4x5x_power_enable(priv->power, 1);
if (ret)
Expand Down

0 comments on commit 1ff203b

Please sign in to comment.