From: Chunyan Zhang <zhang.lyra@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jslaby@suse.com>
Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org,
Orson Zhai <orsonzhai@gmail.com>,
Baolin Wang <baolin.wang7@gmail.com>,
Chunyan Zhang <zhang.lyra@gmail.com>,
Chunyan Zhang <chunyan.zhang@unisoc.com>
Subject: [PATCH v3 2/2] serial: sprd: remove redundant sprd_port cleanup
Date: Wed, 18 Mar 2020 18:50:49 +0800 [thread overview]
Message-ID: <20200318105049.19623-3-zhang.lyra@gmail.com> (raw)
In-Reply-To: <20200318105049.19623-1-zhang.lyra@gmail.com>
From: Chunyan Zhang <chunyan.zhang@unisoc.com>
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.
Signed-off-by: Chunyan Zhang <chunyan.zhang@unisoc.com>
---
drivers/tty/serial/sprd_serial.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/tty/serial/sprd_serial.c b/drivers/tty/serial/sprd_serial.c
index e9d148d47bec..cefdd051b2d0 100644
--- a/drivers/tty/serial/sprd_serial.c
+++ b/drivers/tty/serial/sprd_serial.c
@@ -1237,10 +1237,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);
--
2.20.1
next prev parent reply other threads:[~2020-03-18 10:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-18 10:50 [PATCH v3 0/2] two fixes on sprd serial driver Chunyan Zhang
2020-03-18 10:50 ` [PATCH v3 1/2] serial: sprd: getting port index via serial aliases only Chunyan Zhang
2020-03-18 10:54 ` Baolin Wang
2020-03-18 10:50 ` Chunyan Zhang [this message]
2020-03-18 10:55 ` [PATCH v3 2/2] serial: sprd: remove redundant sprd_port cleanup Baolin Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200318105049.19623-3-zhang.lyra@gmail.com \
--to=zhang.lyra@gmail.com \
--cc=baolin.wang7@gmail.com \
--cc=chunyan.zhang@unisoc.com \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=orsonzhai@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).