Re: [PATCH] net/usb: Use kzalloc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> On 2011-08-02 at 18:09:28 +0200, Thomas Meyer <thomas@xxxxxxxx> wrote:
>> --- a/drivers/net/usb/cdc_ncm.c 2011-07-26 00:46:08.126846923 +0200
>> +++ b/drivers/net/usb/cdc_ncm.c 2011-08-01 20:20:43.396390040 +0200
>> @@ -479,12 +479,10 @@ static int cdc_ncm_bind(struct usbnet *d
>>       int temp;
>>       u8 iface_no;
>>
>> -     ctx = kmalloc(sizeof(*ctx), GFP_KERNEL);
>> +     ctx = kzalloc(sizeof(*ctx), GFP_KERNEL);
>>       if (ctx == NULL)
>>               return -ENODEV;
>>
>> -     memset(ctx, 0, sizeof(*ctx));
>> -
>>       init_timer(&ctx->tx_timer);
>>       spin_lock_init(&ctx->mtx);
>>       ctx->netdev = dev->net;
>>
>>
>> --

I think we could do with a log message before the SOB too (like you
did in your 'Use resource_size()' patch? :-)
The subject line is rather terse on its own.

Cheers
Julie
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux