lkml.org 
[lkml]   [2011]   [Aug]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/8] staging: vme_user: change kmalloc+memset to kzalloc
On 01/08/11 11:52, Martyn Welch wrote:
> On 01/08/11 11:20, Manohar Vanga wrote:
>> Signed-off-by: Manohar Vanga <manohar.vanga@cern.ch>
>
> Acked-by: Martyn Welch <martyn.welch@ge.com>
>

Greg, please can you apply this patch.

As it's the first in the series, deals with a separate issue from the rest of
the patch series it would mean one less patch for Manohar to resend.

Martyn

>> ---
>> drivers/staging/vme/devices/vme_user.c | 4 +---
>> 1 files changed, 1 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/staging/vme/devices/vme_user.c b/drivers/staging/vme/devices/vme_user.c
>> index 91d2cc7..3cbeb2a 100644
>> --- a/drivers/staging/vme/devices/vme_user.c
>> +++ b/drivers/staging/vme/devices/vme_user.c
>> @@ -651,7 +651,7 @@ static int __init vme_user_init(void)
>>
>>
>> /* Dynamically create the bind table based on module parameters */
>> - ids = kmalloc(sizeof(struct vme_device_id) * (bus_num + 1), GFP_KERNEL);
>> + ids = kzalloc(sizeof(struct vme_device_id) * (bus_num + 1), GFP_KERNEL);
>> if (ids == NULL) {
>> printk(KERN_ERR "%s: Unable to allocate ID table\n",
>> driver_name);
>> @@ -659,8 +659,6 @@ static int __init vme_user_init(void)
>> goto err_id;
>> }
>>
>> - memset(ids, 0, (sizeof(struct vme_device_id) * (bus_num + 1)));
>> -
>> for (i = 0; i < bus_num; i++) {
>> ids[i].bus = bus[i];
>> /*
>
>


--
Martyn Welch (Principal Software Engineer) | Registered in England and
GE Intelligent Platforms | Wales (3828642) at 100
T +44(0)127322748 | Barbirolli Square, Manchester,
E martyn.welch@ge.com | M2 3AB VAT:GB 927559189


\
 
 \ /
  Last update: 2011-08-10 09:47    [W:0.414 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site