On 5/26/2012 6:20 AM, Anton Vorontsov wrote: > +static int ramoops_init_przs(struct device *dev, struct ramoops_context *cxt, > + phys_addr_t *paddr, size_t dump_mem_sz) > +{ > + int err = -ENOMEM; > + int i; > + > + if (!cxt->record_size) > + return 0; > + > + cxt->max_dump_cnt = dump_mem_sz / cxt->record_size; > + if (!cxt->max_dump_cnt) > + return -ENOMEM; > + > + cxt->przs = kzalloc(sizeof(*cxt->przs) * cxt->max_dump_cnt, > + GFP_KERNEL); kcalloc would be better but I see you're just moving code here so it doesn't need to be changed in this patch. -- Sent by an employee of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum. _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel