Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1683563 > unrolled thread
| Started by | Christophe JAILLET <christophe.jaillet@wanadoo.fr> |
|---|---|
| First post | 2017-07-08 10:50 +0200 |
| Last post | 2017-07-11 08:50 +0200 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH v2] mrf24j40: Fix en error handling path in 'mrf24j40_probe()' Christophe JAILLET <christophe.jaillet@wanadoo.fr> - 2017-07-08 10:50 +0200
Re: [PATCH v2] mrf24j40: Fix en error handling path in 'mrf24j40_probe()' Alan Ott <alan@signal11.us> - 2017-07-10 21:30 +0200
Re: [PATCH v2] mrf24j40: Fix en error handling path in 'mrf24j40_probe()' Marcel Holtmann <marcel@holtmann.org> - 2017-07-11 08:50 +0200
| From | Christophe JAILLET <christophe.jaillet@wanadoo.fr> |
|---|---|
| Date | 2017-07-08 10:50 +0200 |
| Subject | [PATCH v2] mrf24j40: Fix en error handling path in 'mrf24j40_probe()' |
| Message-ID | <u0TB7-8kI-7@gated-at.bofh.it> |
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>
---
V2: initialization of ret in this erro path ws missing. Stupid me!
---
drivers/net/ieee802154/mrf24j40.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ieee802154/mrf24j40.c b/drivers/net/ieee802154/mrf24j40.c
index 7d334963dc08..da8683782ffc 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);
--
2.11.0
[toc] | [next] | [standalone]
| From | Alan Ott <alan@signal11.us> |
|---|---|
| Date | 2017-07-10 21:30 +0200 |
| Subject | Re: [PATCH v2] mrf24j40: Fix en error handling path in 'mrf24j40_probe()' |
| Message-ID | <u1MxA-Ey-17@gated-at.bofh.it> |
| In reply to | #1683563 |
On 07/08/2017 04:40 AM, Christophe JAILLET wrote:
> 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>
> ---
> V2: initialization of ret in this erro path ws missing. Stupid me!
> ---
> drivers/net/ieee802154/mrf24j40.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ieee802154/mrf24j40.c b/drivers/net/ieee802154/mrf24j40.c
> index 7d334963dc08..da8683782ffc 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);
>
Acked-by: Alan Ott <alan@signal11.us>
[toc] | [prev] | [next] | [standalone]
| From | Marcel Holtmann <marcel@holtmann.org> |
|---|---|
| Date | 2017-07-11 08:50 +0200 |
| Subject | Re: [PATCH v2] mrf24j40: Fix en error handling path in 'mrf24j40_probe()' |
| Message-ID | <u1X9D-7ho-1@gated-at.bofh.it> |
| In reply to | #1683563 |
Hi Christophe, > 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> > --- > V2: initialization of ret in this erro path ws missing. Stupid me! > --- > drivers/net/ieee802154/mrf24j40.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) patch has been applied to bluetooth-next tree. Regards Marcel
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web