1
0
Fork 0

can: tcan4x5x: tcan4x5x_can_probe(): add missing error checking for devm_regmap_init()

[ Upstream commit 1ff203badb ]

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

Fixes: 5443c226ba ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
5.4-rM2-2.2.x-imx-squashed
Marc Kleine-Budde 2020-01-03 11:30:34 +01:00 committed by Greg Kroah-Hartman
parent 84089205db
commit d527bb8bd5
1 changed files with 4 additions and 0 deletions

View File

@ -467,6 +467,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;
}
tcan4x5x_power_enable(priv->power, 1);