linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Oliver Neukum <oneukum@suse.de>
To: Jaejoong Kim <climbbb.kim@gmail.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-usb@vger.kernel.org
Subject: usb: cdc-acm: Decrement tty port's refcount if probe() fail
Date: Thu, 21 Jun 2018 11:02:16 +0200	[thread overview]
Message-ID: <1529571736.17868.3.camel@suse.de> (raw)

On Do, 2018-06-21 at 17:45 +0900, Jaejoong Kim wrote:
> The cdc-acm driver does not have a refcount of itself, but uses a
> tty_port's refcount. That is, if the refcount of tty_port is '0', we
> can clean up the cdc-acm driver by calling the .destruct()
> callback function of struct tty_port_operations.
> 
> The problem is the destruct() callback function is not called if
> the probe() fails, because tty_port's refcount is not zero. So,
> add tty_port_put() when probe() fails.
> 
> Signed-off-by: Jaejoong Kim <climbbb.kim@gmail.com>
Acked-by: Oliver Neukum <oneukum@suse.com>
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

             reply	other threads:[~2018-06-21  9:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-21  9:02 Oliver Neukum [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-06-21  9:02 usb: cdc-acm: Decrement tty port's refcount if probe() fail Oliver Neukum
2018-06-21  8:45 Jaejoong Kim

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=1529571736.17868.3.camel@suse.de \
    --to=oneukum@suse.de \
    --cc=climbbb.kim@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-usb@vger.kernel.org \
    /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).