* [PATCH v2] mrf24j40: Fix en error handling path in 'mrf24j40_probe()'
@ 2017-07-08 8:40 ` Christophe JAILLET
0 siblings, 0 replies; 6+ messages in thread
From: Christophe JAILLET @ 2017-07-08 8:40 UTC (permalink / raw)
To: alan, alex.aring, stefan
Cc: linux-wpan, netdev, linux-kernel, kernel-janitors, Christophe JAILLET
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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2] mrf24j40: Fix en error handling path in 'mrf24j40_probe()'
@ 2017-07-08 8:40 ` Christophe JAILLET
0 siblings, 0 replies; 6+ messages in thread
From: Christophe JAILLET @ 2017-07-08 8:40 UTC (permalink / raw)
To: alan, alex.aring, stefan
Cc: linux-wpan, netdev, linux-kernel, kernel-janitors, Christophe JAILLET
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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2] mrf24j40: Fix en error handling path in 'mrf24j40_probe()'
2017-07-08 8:40 ` Christophe JAILLET
@ 2017-07-10 19:24 ` Alan Ott
-1 siblings, 0 replies; 6+ messages in thread
From: Alan Ott @ 2017-07-10 19:24 UTC (permalink / raw)
To: Christophe JAILLET, alex.aring, stefan
Cc: linux-wpan, netdev, linux-kernel, kernel-janitors
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>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] mrf24j40: Fix en error handling path in 'mrf24j40_probe()'
@ 2017-07-10 19:24 ` Alan Ott
0 siblings, 0 replies; 6+ messages in thread
From: Alan Ott @ 2017-07-10 19:24 UTC (permalink / raw)
To: Christophe JAILLET, alex.aring, stefan
Cc: linux-wpan, netdev, linux-kernel, kernel-janitors
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>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] mrf24j40: Fix en error handling path in 'mrf24j40_probe()'
2017-07-08 8:40 ` Christophe JAILLET
@ 2017-07-11 6:48 ` Marcel Holtmann
-1 siblings, 0 replies; 6+ messages in thread
From: Marcel Holtmann @ 2017-07-11 6:48 UTC (permalink / raw)
To: Christophe JAILLET
Cc: Alan Ott, Alexander Aring, Stefan Schmidt, linux-wpan, netdev,
linux-kernel, kernel-janitors
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] mrf24j40: Fix en error handling path in 'mrf24j40_probe()'
@ 2017-07-11 6:48 ` Marcel Holtmann
0 siblings, 0 replies; 6+ messages in thread
From: Marcel Holtmann @ 2017-07-11 6:48 UTC (permalink / raw)
To: Christophe JAILLET
Cc: Alan Ott, Alexander Aring, Stefan Schmidt, linux-wpan, netdev,
linux-kernel, kernel-janitors
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
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-07-11 6:48 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-08 8:40 [PATCH v2] mrf24j40: Fix en error handling path in 'mrf24j40_probe()' Christophe JAILLET
2017-07-08 8:40 ` Christophe JAILLET
2017-07-10 19:24 ` Alan Ott
2017-07-10 19:24 ` Alan Ott
2017-07-11 6:48 ` Marcel Holtmann
2017-07-11 6:48 ` Marcel Holtmann
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.