diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2017-07-08 11:40:13 +0300 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2017-07-25 14:17:31 +0300 |
commit | 98b5798499b6614963e693dff5262de8d33b2cd0 (patch) | |
tree | 1528db1c6861ba2b824e902e504f2dbcc1353cd6 /drivers/net/ieee802154 | |
parent | 6a48542091d6d1d35edcd8b7422a6689c45916a9 (diff) | |
download | linux-98b5798499b6614963e693dff5262de8d33b2cd0.tar.xz |
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: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: Alan Ott <alan@signal11.us>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'drivers/net/ieee802154')
-rw-r--r-- | drivers/net/ieee802154/mrf24j40.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ieee802154/mrf24j40.c b/drivers/net/ieee802154/mrf24j40.c index 7d334963dc08..ee7084b2d52d 100644 --- a/drivers/net/ieee802154/mrf24j40.c +++ b/drivers/net/ieee802154/mrf24j40.c @@ -1330,7 +1330,8 @@ static int mrf24j40_probe(struct spi_device *spi) if (spi->max_speed_hz > MAX_SPI_SPEED_HZ) { dev_warn(&spi->dev, "spi clock above possible maximum: %d", MAX_SPI_SPEED_HZ); - return -EINVAL; + ret = -EINVAL; + goto err_register_device; } ret = mrf24j40_hw_init(devrec); |