* [PATCH] serial: 8250_bcm7271: Fix return error code in case of dma_alloc_coherent() failure
@ 2022-01-04 17:50 Lad Prabhakar
2022-01-04 18:12 ` Florian Fainelli
2022-01-05 9:48 ` Andy Shevchenko
0 siblings, 2 replies; 3+ messages in thread
From: Lad Prabhakar @ 2022-01-04 17:50 UTC (permalink / raw)
To: Al Cooper, Greg Kroah-Hartman, Jiri Slaby, Florian Fainelli,
Lad Prabhakar
Cc: Andy Shevchenko, Prabhakar, linux-serial,
bcm-kernel-feedback-list, linux-kernel
In case of dma_alloc_coherent() failure return -ENOMEM instead of
returning -EINVAL.
Fixes: c195438f1e84 ("serial: 8250_bcm7271: Propagate error codes from brcmuart_probe()")
Reported-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
Hi All,
This patch applies to -next.
Cheers,
Prabhakar
---
drivers/tty/serial/8250/8250_bcm7271.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/tty/serial/8250/8250_bcm7271.c b/drivers/tty/serial/8250/8250_bcm7271.c
index cc60a7874e8b..9b878d023dac 100644
--- a/drivers/tty/serial/8250/8250_bcm7271.c
+++ b/drivers/tty/serial/8250/8250_bcm7271.c
@@ -1075,7 +1075,7 @@ static int brcmuart_probe(struct platform_device *pdev)
priv->rx_size,
&priv->rx_addr, GFP_KERNEL);
if (!priv->rx_bufs) {
- ret = -EINVAL;
+ ret = -ENOMEM;
goto err;
}
priv->tx_size = UART_XMIT_SIZE;
@@ -1083,7 +1083,7 @@ static int brcmuart_probe(struct platform_device *pdev)
priv->tx_size,
&priv->tx_addr, GFP_KERNEL);
if (!priv->tx_buf) {
- ret = -EINVAL;
+ ret = -ENOMEM;
goto err;
}
}
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] serial: 8250_bcm7271: Fix return error code in case of dma_alloc_coherent() failure
2022-01-04 17:50 [PATCH] serial: 8250_bcm7271: Fix return error code in case of dma_alloc_coherent() failure Lad Prabhakar
@ 2022-01-04 18:12 ` Florian Fainelli
2022-01-05 9:48 ` Andy Shevchenko
1 sibling, 0 replies; 3+ messages in thread
From: Florian Fainelli @ 2022-01-04 18:12 UTC (permalink / raw)
To: Lad Prabhakar, Al Cooper, Greg Kroah-Hartman, Jiri Slaby
Cc: Andy Shevchenko, Prabhakar, linux-serial,
bcm-kernel-feedback-list, linux-kernel
On 1/4/22 9:50 AM, Lad Prabhakar wrote:
> In case of dma_alloc_coherent() failure return -ENOMEM instead of
> returning -EINVAL.
>
> Fixes: c195438f1e84 ("serial: 8250_bcm7271: Propagate error codes from brcmuart_probe()")
> Reported-by: Andy Shevchenko <andy.shevchenko@gmail.com>
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
The fixes tag may be a bit superfluous since this is just an error path,
but it is correct nonetheless.
--
Florian
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] serial: 8250_bcm7271: Fix return error code in case of dma_alloc_coherent() failure
2022-01-04 17:50 [PATCH] serial: 8250_bcm7271: Fix return error code in case of dma_alloc_coherent() failure Lad Prabhakar
2022-01-04 18:12 ` Florian Fainelli
@ 2022-01-05 9:48 ` Andy Shevchenko
1 sibling, 0 replies; 3+ messages in thread
From: Andy Shevchenko @ 2022-01-05 9:48 UTC (permalink / raw)
To: Lad Prabhakar
Cc: Al Cooper, Greg Kroah-Hartman, Jiri Slaby, Florian Fainelli,
Prabhakar, open list:SERIAL DRIVERS, bcm-kernel-feedback-list,
Linux Kernel Mailing List
On Tue, Jan 4, 2022 at 7:50 PM Lad Prabhakar
<prabhakar.mahadev-lad.rj@bp.renesas.com> wrote:
>
> In case of dma_alloc_coherent() failure return -ENOMEM instead of
> returning -EINVAL.
>
> Fixes: c195438f1e84 ("serial: 8250_bcm7271: Propagate error codes from brcmuart_probe()")
It doesn't fix any issue that needs to be backported.
After dropping that tag,
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
> Reported-by: Andy Shevchenko <andy.shevchenko@gmail.com>
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> ---
> Hi All,
>
> This patch applies to -next.
The rule of thumb is to test it against the subsystem thru which you
are routing your patch, in this case you need to use tty-next.
>
> Cheers,
> Prabhakar
> ---
> drivers/tty/serial/8250/8250_bcm7271.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/tty/serial/8250/8250_bcm7271.c b/drivers/tty/serial/8250/8250_bcm7271.c
> index cc60a7874e8b..9b878d023dac 100644
> --- a/drivers/tty/serial/8250/8250_bcm7271.c
> +++ b/drivers/tty/serial/8250/8250_bcm7271.c
> @@ -1075,7 +1075,7 @@ static int brcmuart_probe(struct platform_device *pdev)
> priv->rx_size,
> &priv->rx_addr, GFP_KERNEL);
> if (!priv->rx_bufs) {
> - ret = -EINVAL;
> + ret = -ENOMEM;
> goto err;
> }
> priv->tx_size = UART_XMIT_SIZE;
> @@ -1083,7 +1083,7 @@ static int brcmuart_probe(struct platform_device *pdev)
> priv->tx_size,
> &priv->tx_addr, GFP_KERNEL);
> if (!priv->tx_buf) {
> - ret = -EINVAL;
> + ret = -ENOMEM;
> goto err;
> }
> }
> --
> 2.17.1
>
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-01-05 9:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-04 17:50 [PATCH] serial: 8250_bcm7271: Fix return error code in case of dma_alloc_coherent() failure Lad Prabhakar
2022-01-04 18:12 ` Florian Fainelli
2022-01-05 9:48 ` Andy Shevchenko
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.