All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Arend van Spriel <arend.vanspriel@broadcom.com>,
	Greg KH <gregkh@linuxfoundation.org>,
	Carlos Manuel Santos <cmmpsantos@gmail.com>,
	Samuel Ortiz <sameo@linux.intel.com>,
	Stephen Hemminger <stephen@networkplumber.org>
Cc: linux-usb@vger.kernel.org, linux-wireless@vger.kernel.org
Subject: Re: ACS ACR122U not working: pn533_usb 1-1:1.0: NFC: Couldn't poweron...
Date: Fri, 18 May 2018 11:03:28 +0200	[thread overview]
Message-ID: <1526634208.3805.2.camel@sipsolutions.net> (raw)
In-Reply-To: <5AFE9539.4010106@broadcom.com> (sfid-20180518_105700_905753_8ABAEE10)

On Fri, 2018-05-18 at 10:56 +0200, Arend van Spriel wrote:
> 
> > +	buffer = kmalloc(sizeof(cmd), GFP_KERNEL);
> > +	if (!buffer)
> > +		return -ENOMEM;
> > +	memcpy(buffer, cmd, sizeof(cmd));

It should also use kmemdup() ;-)

johannes

WARNING: multiple messages have this Message-ID (diff)
From: Johannes Berg <johannes@sipsolutions.net>
To: Arend van Spriel <arend.vanspriel@broadcom.com>,
	Greg KH <gregkh@linuxfoundation.org>,
	Carlos Manuel Santos <cmmpsantos@gmail.com>,
	Samuel Ortiz <sameo@linux.intel.com>,
	Stephen Hemminger <stephen@networkplumber.org>
Cc: linux-usb@vger.kernel.org, linux-wireless@vger.kernel.org
Subject: ACS ACR122U not working: pn533_usb 1-1:1.0: NFC: Couldn't poweron...
Date: Fri, 18 May 2018 11:03:28 +0200	[thread overview]
Message-ID: <1526634208.3805.2.camel@sipsolutions.net> (raw)

On Fri, 2018-05-18 at 10:56 +0200, Arend van Spriel wrote:
> 
> > +	buffer = kmalloc(sizeof(cmd), GFP_KERNEL);
> > +	if (!buffer)
> > +		return -ENOMEM;
> > +	memcpy(buffer, cmd, sizeof(cmd));

It should also use kmemdup() ;-)

johannes
---
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-05-18  9:03 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CACyys_-Z9nnun3TdYFk+0qqoQHcK4CCyCNH-qaGGEf+5GFPkAQ@mail.gmail.com>
     [not found] ` <20180517141217.GA32551@kroah.com>
2018-05-17 16:40   ` ACS ACR122U not working: pn533_usb 1-1:1.0: NFC: Couldn't poweron Greg KH
2018-05-17 16:40     ` Greg Kroah-Hartman
2018-05-17 16:46     ` Greg KH
2018-05-17 16:46       ` Greg Kroah-Hartman
2018-05-18  8:56       ` Arend van Spriel
2018-05-18  8:56         ` Arend Van Spriel
2018-05-18  9:03         ` Johannes Berg [this message]
2018-05-18  9:03           ` Johannes Berg
2018-05-18  9:12         ` Greg KH
2018-05-18  9:12           ` Greg Kroah-Hartman
2018-05-18  2:36     ` [PATCH] NFC: pn533: don't send USB data off of the stack kbuild test robot
2018-05-18  2:36       ` ACS ACR122U not working: pn533_usb 1-1:1.0: NFC: Couldn't poweron kbuild test robot

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=1526634208.3805.2.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=arend.vanspriel@broadcom.com \
    --cc=cmmpsantos@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=sameo@linux.intel.com \
    --cc=stephen@networkplumber.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.