Linux Serial subsystem development
 help / color / mirror / Atom feed
[parent not found: <1547448961-9588-1-git-send-email-yes>]
* [PATCH] tty: not call tty close in fallback
@ 2019-01-14  6:56 yes
  0 siblings, 0 replies; 4+ messages in thread
From: yes @ 2019-01-14  6:56 UTC (permalink / raw)
  To: robh, gregkh, jslaby, linux-serial, linux-kernel

From: Li RongQing <lirongqing@baidu.com>

when fail to open tty, tty is not in open status and not need
to call close

Signed-off-by: Li RongQing <lirongqing@baidu.com>
---
 drivers/tty/serdev/serdev-ttyport.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/tty/serdev/serdev-ttyport.c b/drivers/tty/serdev/serdev-ttyport.c
index fa1672993b4c..bcc1e27d00de 100644
--- a/drivers/tty/serdev/serdev-ttyport.c
+++ b/drivers/tty/serdev/serdev-ttyport.c
@@ -121,7 +121,7 @@ static int ttyport_open(struct serdev_controller *ctrl)
 
 	ret = tty->ops->open(serport->tty, NULL);
 	if (ret)
-		goto err_close;
+		goto err_unlock;
 
 	tty_unlock(serport->tty);
 
@@ -142,8 +142,6 @@ static int ttyport_open(struct serdev_controller *ctrl)
 
 	return 0;
 
-err_close:
-	tty->ops->close(tty, NULL);
 err_unlock:
 	tty_unlock(tty);
 	tty_release_struct(tty, serport->tty_idx);
-- 
2.16.2

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-02-19 12:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <5c3c3289.1c69fb81.c1953.0900SMTPIN_ADDED_BROKEN@mx.google.com>
2019-02-19 12:41 ` [PATCH] tty: not call tty close in fallback Greg KH
     [not found] <1547448961-9588-1-git-send-email-yes>
2019-01-14  7:20 ` Jiri Slaby
2019-01-14  7:51 ` Jiri Slaby
2019-01-14  6:56 yes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox