[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220105180704.8989-1-prabhakar.mahadev-lad.rj@bp.renesas.com>
Date: Wed, 5 Jan 2022 18:07:03 +0000
From: Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>
To: Al Cooper <alcooperx@...il.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jiri Slaby <jirislaby@...nel.org>
Cc: Andy Shevchenko <andy.shevchenko@...il.com>,
Florian Fainelli <f.fainelli@...il.com>,
Prabhakar <prabhakar.csengg@...il.com>,
Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>,
linux-serial@...r.kernel.org,
bcm-kernel-feedback-list@...adcom.com, linux-kernel@...r.kernel.org
Subject: [PATCH v2] serial: 8250_bcm7271: Fix return error code in case of dma_alloc_coherent() failure
In case of dma_alloc_coherent() failure return -ENOMEM instead of
returning -EINVAL.
Reported-by: Andy Shevchenko <andy.shevchenko@...il.com>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>
Acked-by: Florian Fainelli <f.fainelli@...il.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@...il.com>
---
v1->v2
* Dropped fixes tag as suggested by Florian/Andy
---
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
Powered by blists - more mailing lists