linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Zqiang <qiang.zhang@windriver.com>
Cc: balbi@kernel.org, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] usb: gadget: function: printer: Fix usb function descriptors leak
Date: Wed, 14 Oct 2020 10:12:46 +0200	[thread overview]
Message-ID: <20201014081246.GB3009479@kroah.com> (raw)
In-Reply-To: <20201014075523.15688-1-qiang.zhang@windriver.com>

On Wed, Oct 14, 2020 at 03:55:23PM +0800, Zqiang wrote:
> If an error occurs after call 'usb_assign_descriptors' func, the
> 'usb_free_all_descriptors' need to be call to release memory space
> occupied by function descriptors.
> 
> Signed-off-by: Zqiang <qiang.zhang@windriver.com>

Please use your ful name for the From: and signed-off-by lines, as the
documentation states is required.  If this is your full name, then why
does it not match the name on your email address from your employer?

> ---
>  drivers/usb/gadget/function/f_printer.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/usb/gadget/function/f_printer.c b/drivers/usb/gadget/function/f_printer.c
> index 64a4112068fc..2f1eb2e81d30 100644
> --- a/drivers/usb/gadget/function/f_printer.c
> +++ b/drivers/usb/gadget/function/f_printer.c
> @@ -1162,6 +1162,7 @@ static int printer_func_bind(struct usb_configuration *c,
>  		printer_req_free(dev->in_ep, req);
>  	}
>  
> +	usb_free_all_descriptors(f);

What commit caused this problem?

thanks,

greg k-h

  reply	other threads:[~2020-10-14  8:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-14  7:55 [PATCH] usb: gadget: function: printer: Fix usb function descriptors leak Zqiang
2020-10-14  8:12 ` Greg KH [this message]
2020-10-14  8:28 qiang.zhang

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=20201014081246.GB3009479@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=balbi@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=qiang.zhang@windriver.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).