linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Tissoires <benjamin.tissoires@gmail.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Jiri Kosina <jkosina@suse.cz>,
	Nestor Lopez Casado <nlopezcasad@logitech.com>
Cc: torvalds@linux-foundation.org, linux-input@vger.kernel.org
Subject: Re: [PATCH RESEND #4] dj: memory scribble in logi_dj
Date: Thu, 6 Sep 2012 13:39:42 +0200	[thread overview]
Message-ID: <CAN+gG=F-KGrfBecqwRa_7LYHvzzRLZebN6hYuAv8NRAD3U6nEw@mail.gmail.com> (raw)
In-Reply-To: <20120904140924.26323.88903.stgit@localhost.localdomain>

Hi Alan,

Sorry for not seeing this earlier.

Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>

Jiri, can this fall into upstream-fixes?

Thanks,
Benjamin

On Tue, Sep 4, 2012 at 4:10 PM, Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
> I've been sending this to the input list and maintainer for a month now with
> no response, so this time it goes directly to Linus.
>
> From: Alan Cox <alan@linux.intel.com>
>
> Allocate a structure not a pointer to it !
>
> Signed-off-by: Alan Cox <alan@linux.intel.com>
> ---
>
>  drivers/hid/hid-logitech-dj.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/hid/hid-logitech-dj.c b/drivers/hid/hid-logitech-dj.c
> index 0f9c146..4d524b5 100644
> --- a/drivers/hid/hid-logitech-dj.c
> +++ b/drivers/hid/hid-logitech-dj.c
> @@ -439,7 +439,7 @@ static int logi_dj_recv_query_paired_devices(struct dj_receiver_dev *djrcv_dev)
>         struct dj_report *dj_report;
>         int retval;
>
> -       dj_report = kzalloc(sizeof(dj_report), GFP_KERNEL);
> +       dj_report = kzalloc(sizeof(struct dj_report), GFP_KERNEL);
>         if (!dj_report)
>                 return -ENOMEM;
>         dj_report->report_id = REPORT_ID_DJ_SHORT;
> @@ -456,7 +456,7 @@ static int logi_dj_recv_switch_to_dj_mode(struct dj_receiver_dev *djrcv_dev,
>         struct dj_report *dj_report;
>         int retval;
>
> -       dj_report = kzalloc(sizeof(dj_report), GFP_KERNEL);
> +       dj_report = kzalloc(sizeof(struct dj_report), GFP_KERNEL);
>         if (!dj_report)
>                 return -ENOMEM;
>         dj_report->report_id = REPORT_ID_DJ_SHORT;
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-input" 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:[~2012-09-06 11:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-04 14:10 [PATCH RESEND #4] dj: memory scribble in logi_dj Alan Cox
2012-09-06 11:39 ` Benjamin Tissoires [this message]
2012-09-06 11:47   ` Jiri Kosina

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='CAN+gG=F-KGrfBecqwRa_7LYHvzzRLZebN6hYuAv8NRAD3U6nEw@mail.gmail.com' \
    --to=benjamin.tissoires@gmail.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=jkosina@suse.cz \
    --cc=linux-input@vger.kernel.org \
    --cc=nlopezcasad@logitech.com \
    --cc=torvalds@linux-foundation.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).