Skip to content

Commit cbd0e48

Browse files
committed
Merge tag 'tty-5.7-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Pull tty/serial fixes from Greg KH: "Here are three small TTY/Serial/VT fixes for 5.7-rc5: - revert for the bcm63xx driver "fix" that was incorrect - vt unicode console bugfix - xilinx_uartps console driver fix All of these have been in linux next with no reported issues" * tag 'tty-5.7-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: tty: xilinx_uartps: Fix missing id assignment to the console vt: fix unicode console freeing with a common interface Revert "tty: serial: bcm63xx: fix missing clk_put() in bcm63xx_uart"
2 parents 0a0b96b + 2ae11c4 commit cbd0e48

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

drivers/tty/serial/bcm63xx_uart.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -843,10 +843,8 @@ static int bcm_uart_probe(struct platform_device *pdev)
843843
if (IS_ERR(clk) && pdev->dev.of_node)
844844
clk = of_clk_get(pdev->dev.of_node, 0);
845845

846-
if (IS_ERR(clk)) {
847-
clk_put(clk);
846+
if (IS_ERR(clk))
848847
return -ENODEV;
849-
}
850848

851849
port->iotype = UPIO_MEM;
852850
port->irq = res_irq->start;

drivers/tty/serial/xilinx_uartps.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1459,6 +1459,7 @@ static int cdns_uart_probe(struct platform_device *pdev)
14591459
cdns_uart_uart_driver.nr = CDNS_UART_NR_PORTS;
14601460
#ifdef CONFIG_SERIAL_XILINX_PS_UART_CONSOLE
14611461
cdns_uart_uart_driver.cons = &cdns_uart_console;
1462+
cdns_uart_console.index = id;
14621463
#endif
14631464

14641465
rc = uart_register_driver(&cdns_uart_uart_driver);

drivers/tty/vt/vt.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,9 +365,14 @@ static struct uni_screen *vc_uniscr_alloc(unsigned int cols, unsigned int rows)
365365
return uniscr;
366366
}
367367

368+
static void vc_uniscr_free(struct uni_screen *uniscr)
369+
{
370+
vfree(uniscr);
371+
}
372+
368373
static void vc_uniscr_set(struct vc_data *vc, struct uni_screen *new_uniscr)
369374
{
370-
vfree(vc->vc_uni_screen);
375+
vc_uniscr_free(vc->vc_uni_screen);
371376
vc->vc_uni_screen = new_uniscr;
372377
}
373378

@@ -1230,7 +1235,7 @@ static int vc_do_resize(struct tty_struct *tty, struct vc_data *vc,
12301235
err = resize_screen(vc, new_cols, new_rows, user);
12311236
if (err) {
12321237
kfree(newscreen);
1233-
kfree(new_uniscr);
1238+
vc_uniscr_free(new_uniscr);
12341239
return err;
12351240
}
12361241

0 commit comments

Comments
 (0)