mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
To: Jiasheng Jiang <jiasheng@iscas.ac.cn>,
	yashsri421@gmail.com, davem@davemloft.net, rdunlap@infradead.org
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] NFC: nfcmrvl: add unanchor after anchor
Date: Thu, 4 Nov 2021 12:28:58 +0100	[thread overview]
Message-ID: <339a6580-4c03-8aeb-e790-8645b6501831@canonical.com> (raw)
In-Reply-To: <1636016141-3645490-1-git-send-email-jiasheng@iscas.ac.cn>

On 04/11/2021 09:55, Jiasheng Jiang wrote:
> In the error path, the anchored urb is unanchored.
> But in the successful path, the anchored urb is not.
> Therefore, it might be better to add unanchor().
> 
> Fixes: f26e30c ("NFC: nfcmrvl: Initial commit for Marvell NFC driver")
> Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
> ---
>  drivers/nfc/nfcmrvl/usb.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/nfc/nfcmrvl/usb.c b/drivers/nfc/nfcmrvl/usb.c
> index bcd563c..f8ae517 100644
> --- a/drivers/nfc/nfcmrvl/usb.c
> +++ b/drivers/nfc/nfcmrvl/usb.c
> @@ -146,9 +146,9 @@ nfcmrvl_submit_bulk_urb(struct nfcmrvl_usb_drv_data *drv_data, gfp_t mem_flags)
>  		if (err != -EPERM && err != -ENODEV)
>  			nfc_err(&drv_data->udev->dev,
>  				"urb %p submission failed (%d)\n", urb, -err);
> -		usb_unanchor_urb(urb);
>  	}
>  
> +	usb_unanchor_urb(urb);
>  	usb_free_urb(urb);
>  
>  	return err;
> 

Why only this place in the driver? And why only this driver - some
others miss it as well (e.g. btusb which was probably the template for
this one). Are you sure it is a correct patch? Did you test it?

Best regards,
Krzysztof

  reply	other threads:[~2021-11-04 11:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-04  8:55 Jiasheng Jiang
2021-11-04 11:28 ` Krzysztof Kozlowski [this message]
2021-11-06  2:48 ` Jakub Kicinski

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=339a6580-4c03-8aeb-e790-8645b6501831@canonical.com \
    --to=krzysztof.kozlowski@canonical.com \
    --cc=davem@davemloft.net \
    --cc=jiasheng@iscas.ac.cn \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=yashsri421@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

all inboxes | Powered by JetHome®