serial: fix recently introduced problems in tty-next
cover serial: fix recently introduced problems in tty-next
One build fail due to tty-linus -> tty-next merge and one problem smatch found.
Ilpo Järvinen (2):
serial: qcom_geni: Fix variable naming
serial: liteuart: Use proper error rollback
drivers/tty/serial/liteuart.c | 2 +- drivers/tty/serial/qcom_geni_serial.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-)
Signature · 1 line
2.30.2
PATCH 1/2 serial: qcom_geni: Fix variable naming
Commit 2aaa43c70778 ("tty: serial: qcom-geni-serial: add support for serial engine DMA") renamed rx_fifo member to rf_buf which caused a build failure when b8caf69a6946 ("tty: serial: qcom-geni-serial: fix slab-out-of-bounds on RX FIFO buffer") from tty-linus was merged into tty-next.
Fix the member variable name.
--- drivers/tty/serial/qcom_geni_serial.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/tty/serial/qcom_geni_serial.c +5 -5
@@ -1055,11 +1055,11 @@ static int setup_fifos(struct qcom_geni_serial_port *port) uport->fifosize = (port->tx_fifo_depth * port->tx_fifo_width) /BITS_PER_BYTE ; -if (port->rx_fifo && (old_rx_fifo_depth != port->rx_fifo_depth) && port->rx_fifo_depth) { - port->rx_fifo =devm_krealloc (uport->dev, port->rx_fifo, - port->rx_fifo_depth *sizeof (u32), -GFP_KERNEL ); -if (!port->rx_fifo) +if (port->rx_buf && (old_rx_fifo_depth != port->rx_fifo_depth) && port->rx_fifo_depth) { + port->rx_buf =devm_krealloc (uport->dev, port->rx_buf, + port->rx_fifo_depth *sizeof (u32), +GFP_KERNEL ); +if (!port->rx_buf)return -ENOMEM ; }
Signature · 1 line
2.30.2
PATCH 2/2 serial: liteuart: Correct error rollback
In reply to Ilpo JärvinenGoto to the correct rollback label instead of directly returning.
--- drivers/tty/serial/liteuart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tty/serial/liteuart.c +1 -1
@@ -313,7 +313,7 @@ static int liteuart_probe(struct platform_device *pdev) ret =platform_get_irq_optional (pdev,0 );if (ret <0 && ret != -ENXIO ) -return ret; + goto err_erase_id;if (ret >0 ) port->irq = ret;
Signature · 1 line
2.30.2
Re: [PATCH 2/2] serial: liteuart: Correct error rollback
Quoted 15 lines · Ilpo Järvinen
Goto to the correct rollback label instead of directly returning.
Fixes 5602cf99dcdc ("serial: liteuart: add IRQ support for the RX path")Reported-by kernel test robot <[email protected]>Reported-by Dan Carpenter <[email protected]>Signed-off-by Ilpo Järvinen <[email protected]>--- drivers/tty/serial/liteuart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/tty/serial/liteuart.c +0
-0
drivers/tty/serial/liteuart.c static int liteuart_probe(struct platform_device *pdev) · line 316
Quoted 5 lines
drivers/tty/serial/liteuart.c +1
-1@@ -313,7 +313,7 @@ static int liteuart_probe(struct platform_device *pdev) ret =platform_get_irq_optional (pdev,0 );if (ret <0 && ret != -ENXIO ) -return ret; + goto err_erase_id;
That was my mistake, sorry, and thanks for the super-quick fix! :)
Quoted 6 lines
drivers/tty/serial/liteuart.c +0
-0if (ret >0 ) port->irq = ret;Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerQuoted 14 lines · Ilpo Järvinen
One build fail due to tty-linus -> tty-next merge and one problem smatch found.
Ilpo Järvinen (2):
serial:qcom_geni: Fix variable naming
serial: liteuart: Use proper error rollbackdrivers/tty/serial/liteuart.c | 2 +- drivers/tty/serial/qcom_geni_serial.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-)Signature · 1 line
2.30.2
Oh nice, you beat me too it!
thanks for these, I'll go queue them up right now.
greg k-h