提交 98b57984 编写于 作者: C Christophe JAILLET 提交者: Marcel Holtmann

mrf24j40: Fix en error handling path in 'mrf24j40_probe()'

If this check fails, we must release some resources as done everywhere
else in this function before returning an error code.
Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: NAlan Ott <alan@signal11.us>
Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
上级 6a485420
...@@ -1330,7 +1330,8 @@ static int mrf24j40_probe(struct spi_device *spi) ...@@ -1330,7 +1330,8 @@ static int mrf24j40_probe(struct spi_device *spi)
if (spi->max_speed_hz > MAX_SPI_SPEED_HZ) { if (spi->max_speed_hz > MAX_SPI_SPEED_HZ) {
dev_warn(&spi->dev, "spi clock above possible maximum: %d", dev_warn(&spi->dev, "spi clock above possible maximum: %d",
MAX_SPI_SPEED_HZ); MAX_SPI_SPEED_HZ);
return -EINVAL; ret = -EINVAL;
goto err_register_device;
} }
ret = mrf24j40_hw_init(devrec); ret = mrf24j40_hw_init(devrec);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册