summaryrefslogtreecommitdiff
path: root/drivers/tty
diff options
context:
space:
mode:
authorLad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>2022-01-05 18:07:03 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-01-06 15:53:49 +0100
commit0e479b460e342c5fe138391b29d7bfa0a6204af2 (patch)
treecb7e8b55742db84f07de06508335d7b6ee9403a6 /drivers/tty
parent99a507a8ea28542ec196e2dd80096708e2482735 (diff)
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@gmail.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Acked-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Link: https://lore.kernel.org/r/20220105180704.8989-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/8250/8250_bcm7271.c4
1 files 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;
}
}