diff options
author | Chunyan Zhang <chunyan.zhang@unisoc.com> | 2020-03-18 18:50:49 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-03-18 12:20:04 +0100 |
commit | 72534077475fc489f8358c0e214cc1a4d658c8c2 (patch) | |
tree | 9b46a3c73dd25e878ebe77b44f5ac8aba6c93927 /drivers/tty/serial/sprd_serial.c | |
parent | 4b7349cb4e26e79429ecd619eb588bf384f69fdb (diff) | |
download | linux-stable-72534077475fc489f8358c0e214cc1a4d658c8c2.tar.gz linux-stable-72534077475fc489f8358c0e214cc1a4d658c8c2.tar.bz2 linux-stable-72534077475fc489f8358c0e214cc1a4d658c8c2.zip |
serial: sprd: remove redundant sprd_port cleanup
We don't need to cleanup sprd_port anymore, since we've dropped the way
of using the sprd_port[] array to get port index.
Reviewed-by: Baolin Wang <baolin.wang7@gmail.com>
Signed-off-by: Chunyan Zhang <chunyan.zhang@unisoc.com>
Link: https://lore.kernel.org/r/20200318105049.19623-3-zhang.lyra@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/sprd_serial.c')
-rw-r--r-- | drivers/tty/serial/sprd_serial.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/tty/serial/sprd_serial.c b/drivers/tty/serial/sprd_serial.c index 23baf8cf1a3b..9a7ae6384edf 100644 --- a/drivers/tty/serial/sprd_serial.c +++ b/drivers/tty/serial/sprd_serial.c @@ -1236,10 +1236,8 @@ static int sprd_probe(struct platform_device *pdev) sprd_ports_num++; ret = uart_add_one_port(&sprd_uart_driver, up); - if (ret) { - sprd_port[index] = NULL; + if (ret) sprd_remove(pdev); - } platform_set_drvdata(pdev, up); |