[ rockchip ] clean removed patches
This commit is contained in:
parent
7ff7204141
commit
e530439fc0
@ -1,54 +0,0 @@
|
||||
From 7e43ae8446b420907f00b43308ad0b99b6fe4e51 Mon Sep 17 00:00:00 2001
|
||||
From: "Miouyouyou (Myy)" <myy@miouyouyou.fr>
|
||||
Date: Wed, 16 Jan 2019 23:58:52 +0100
|
||||
Subject: [PATCH] drivers: tty: serial: Bail out if no UART is detected
|
||||
|
||||
Before the 5.0, serial8250_register_8250_port consisted of one BIG
|
||||
if(uart && uart->port.type != PORT_8250_CIR) block, which prevented
|
||||
NULL dereference if uart, a pointer to an "uart_8250_port" detected
|
||||
through "serial8250_find_match_or_unused", were to be NULL.
|
||||
|
||||
However, a recent patch added a few bits of code just after that,
|
||||
and that code manipulates the "uart" pointer without checking if
|
||||
it's NULL or not.
|
||||
|
||||
This patch changes the mechanism and bail out early if no UART
|
||||
structure pointer is provided serial8250_find_match_or_unused.
|
||||
|
||||
A goto is used instead of returning directly, since we're inside
|
||||
a mutex and must release it correctly.
|
||||
|
||||
Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
|
||||
---
|
||||
drivers/tty/serial/8250/8250_core.c | 8 +++++++-
|
||||
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c
|
||||
index 189ab1212..11120c2d9 100644
|
||||
--- a/drivers/tty/serial/8250/8250_core.c
|
||||
+++ b/drivers/tty/serial/8250/8250_core.c
|
||||
@@ -981,7 +981,12 @@ int serial8250_register_8250_port(struct uart_8250_port *up)
|
||||
mutex_lock(&serial_mutex);
|
||||
|
||||
uart = serial8250_find_match_or_unused(&up->port);
|
||||
- if (uart && uart->port.type != PORT_8250_CIR) {
|
||||
+ if (!uart) {
|
||||
+ printk(KERN_INFO "One UART port failed to register correctly\n");
|
||||
+ goto no_uart;
|
||||
+ }
|
||||
+
|
||||
+ if (uart->port.type != PORT_8250_CIR) {
|
||||
if (uart->port.dev)
|
||||
uart_remove_one_port(&serial8250_reg, &uart->port);
|
||||
|
||||
@@ -1081,6 +1086,7 @@ int serial8250_register_8250_port(struct uart_8250_port *up)
|
||||
uart->overrun_backoff_time_ms = 0;
|
||||
}
|
||||
|
||||
+no_uart:
|
||||
mutex_unlock(&serial_mutex);
|
||||
|
||||
return ret;
|
||||
--
|
||||
2.16.4
|
||||
|
||||
@ -1,12 +0,0 @@
|
||||
diff --git a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
|
||||
index f108ffa92..76555b4c8 100644
|
||||
--- a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
|
||||
+++ b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
|
||||
@@ -477,7 +477,6 @@ static struct rockchip_hdmi_chip_data rk3328_chip_data = {
|
||||
};
|
||||
|
||||
static const struct dw_hdmi_plat_data rk3328_hdmi_drv_data = {
|
||||
- .mode_valid = dw_hdmi_rockchip_mode_valid,
|
||||
.mpll_cfg = rockchip_mpll_cfg,
|
||||
.cur_ctr = rockchip_cur_ctr,
|
||||
.phy_config = rockchip_phy_config,
|
||||
Loading…
Reference in New Issue
Block a user