serial: sprd: remove redundant sprd_port cleanup

[ Upstream commit 72534077475fc489f8358c0e214cc1a4d658c8c2 ]

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>
Stable-dep-of: f9608f188756 ("serial: sprd: Assign sprd_port after initialized to avoid wrong access")
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Chunyan Zhang
2020-03-18 18:50:49 +08:00
committed by Greg Kroah-Hartman
parent a7d80271a1
commit dff8066579

View File

@@ -1205,10 +1205,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);