linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rymarkiewicz Waldemar <waldemar.rymarkiewicz@tieto.com>
To: Wei Yongjun <weiyj.lk@gmail.com>
Cc: "lauro.venancio@openbossa.org" <lauro.venancio@openbossa.org>,
	"aloisio.almeida@openbossa.org" <aloisio.almeida@openbossa.org>,
	"sameo@linux.intel.com" <sameo@linux.intel.com>,
	"yongjun_wei@trendmicro.com.cn" <yongjun_wei@trendmicro.com.cn>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	"linux-nfc@lists.01.org" <linux-nfc@lists.01.org>
Subject: Re: [linux-nfc] [PATCH] NFC: microread: use kfree_skb() instead of kfree()
Date: Thu, 21 Mar 2013 12:37:14 +0100	[thread overview]
Message-ID: <514AF0EA.9020504@tieto.com> (raw)
In-Reply-To: <CAPgLHd-BKoizHok9hDdAz9yBY1YqfpTov6s3CoefPTtbacQW3g@mail.gmail.com>

Hi,

> Use kfree_skb() instead of kfree() to free sk_buff.
>
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> ---
>   drivers/nfc/microread/mei.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/nfc/microread/mei.c b/drivers/nfc/microread/mei.c
> index eef38cf..da8264c 100644
> --- a/drivers/nfc/microread/mei.c
> +++ b/drivers/nfc/microread/mei.c
> @@ -130,7 +130,7 @@ static void microread_event_cb(struct mei_device *device, u32 events,
>
>   		reply_size = mei_recv(device, skb->data, MEI_NFC_MAX_READ);
>   		if (reply_size < MEI_NFC_HEADER_SIZE) {
> -			kfree(skb);
> +			kfree_skb(skb);
>   			return;
>   		}

kfree_skb call is used internally by the kernel. A driver should use 
dev_kfree_skb instead, I guess.

Thanks,
/Waldek

  reply	other threads:[~2013-03-21 11:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-21  7:40 [PATCH] NFC: microread: use kfree_skb() instead of kfree() Wei Yongjun
2013-03-21 11:37 ` Rymarkiewicz Waldemar [this message]
2013-03-21 13:57   ` [linux-nfc] " Wei Yongjun
2013-03-22 10:38     ` Rymarkiewicz Waldemar
2013-03-28 11:23       ` Samuel Ortiz

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=514AF0EA.9020504@tieto.com \
    --to=waldemar.rymarkiewicz@tieto.com \
    --cc=aloisio.almeida@openbossa.org \
    --cc=lauro.venancio@openbossa.org \
    --cc=linux-nfc@lists.01.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=sameo@linux.intel.com \
    --cc=weiyj.lk@gmail.com \
    --cc=yongjun_wei@trendmicro.com.cn \
    /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).