mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-13 14:14:37 +00:00
can: m_can: tcan4x5x_can_probe(): fix error path: remove erroneous clk_disable_unprepare()
The clocks mcan_class->cclk and mcan_class->hclk are not prepared by any call
during tcan4x5x_can_probe(), so remove erroneous clk_disable_unprepare() on
them.
Fixes: 5443c226ba
("can: tcan4x5x: Add tcan4x5x driver to the kernel")
Link: http://lore.kernel.org/r/20201130114252.215334-1-mkl@pengutronix.de
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
This commit is contained in:
parent
4d521943f7
commit
ad1f5e826d
1 changed files with 3 additions and 8 deletions
|
@ -489,18 +489,18 @@ static int tcan4x5x_can_probe(struct spi_device *spi)
|
|||
spi->bits_per_word = 32;
|
||||
ret = spi_setup(spi);
|
||||
if (ret)
|
||||
goto out_clk;
|
||||
goto out_m_can_class_free_dev;
|
||||
|
||||
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;
|
||||
goto out_m_can_class_free_dev;
|
||||
}
|
||||
|
||||
ret = tcan4x5x_power_enable(priv->power, 1);
|
||||
if (ret)
|
||||
goto out_clk;
|
||||
goto out_m_can_class_free_dev;
|
||||
|
||||
ret = tcan4x5x_parse_config(mcan_class);
|
||||
if (ret)
|
||||
|
@ -519,11 +519,6 @@ static int tcan4x5x_can_probe(struct spi_device *spi)
|
|||
|
||||
out_power:
|
||||
tcan4x5x_power_enable(priv->power, 0);
|
||||
out_clk:
|
||||
if (!IS_ERR(mcan_class->cclk)) {
|
||||
clk_disable_unprepare(mcan_class->cclk);
|
||||
clk_disable_unprepare(mcan_class->hclk);
|
||||
}
|
||||
out_m_can_class_free_dev:
|
||||
m_can_class_free_dev(mcan_class->net);
|
||||
dev_err(&spi->dev, "Probe failed, err=%d\n", ret);
|
||||
|
|
Loading…
Reference in a new issue