[Cbe-oss-dev] [patch 06/16] powerpc and x86_64: Initial port of PCIe endpoint device driver for Axon
Geert Uytterhoeven
Geert.Uytterhoeven at sonycom.com
Wed Mar 12 19:39:46 EST 2008
On Tue, 11 Mar 2008, Christoph Hellwig wrote:
> On Fri, Mar 07, 2008 at 08:28:44PM -0600, Murali Iyer wrote:
> > + /* allocate table for device private structs */
> > + axon_device_table = kmalloc( axon_max_devices * sizeof(struct axon),
> > + GFP_KERNEL);
> > + if ( !axon_device_table) {
> > + printk(KERN_ERR"Axon Driver could not allocate "
> > + "driver table for %d drivers \n",
> > + axon_max_devices);
> > + rc = -ENOMEM;
> > + goto fail_malloc;
> > + }
> > + memset( axon_device_table, 0, axon_max_devices*sizeof(struct axon));
>
> Uze kcalloc instead which does the memset internally.
^^^^^^^
kzalloc
With kind regards,
Geert Uytterhoeven
Software Architect
Sony Network and Software Technology Center Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium
Phone: +32 (0)2 700 8453
Fax: +32 (0)2 700 8622
E-mail: Geert.Uytterhoeven at sonycom.com
Internet: http://www.sony-europe.com/
Sony Network and Software Technology Center Europe
A division of Sony Service Centre (Europe) N.V.
Registered office: Technologielaan 7 · B-1840 Londerzeel · Belgium
VAT BE 0413.825.160 · RPR Brussels
Fortis Bank Zaventem · Swift GEBABEBB08A · IBAN BE39001382358619
More information about the cbe-oss-dev
mailing list