lkml.org 
[lkml]   [2013]   [Jun]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] efi, pstore: Cocci spatch "memdup.spatch"
On Sat, 01 Jun, at 11:40:02AM, Thomas Meyer wrote:
>
> Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
> ---
>
> diff -u -p a/drivers/firmware/efi/efi-pstore.c b/drivers/firmware/efi/efi-pstore.c
> --- a/drivers/firmware/efi/efi-pstore.c
> +++ b/drivers/firmware/efi/efi-pstore.c
> @@ -79,10 +79,9 @@ static int efi_pstore_read_func(struct e
> &entry->var.DataSize, entry->var.Data);
> size = entry->var.DataSize;
>
> - *cb_data->buf = kmalloc(size, GFP_KERNEL);
> + *cb_data->buf = kmemdup(entry->var.Data, size, GFP_KERNEL);
> if (*cb_data->buf == NULL)
> return -ENOMEM;
> - memcpy(*cb_data->buf, entry->var.Data, size);
> return size;
> }

Who wants to pick this one up? Tony?

--
Matt Fleming, Intel Open Source Technology Center


\
 
 \ /
  Last update: 2013-06-03 13:01    [W:0.043 / U:0.768 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site