Re: iteraid.patch added to -mm tree

From: Alexey Dobriyan
Date: Fri Jun 17 2005 - 05:48:48 EST


On 6/16/05, akpm@xxxxxxxx <akpm@xxxxxxxx> wrote:
>
> The patch titled
>
> ITE RAID driver
>
> has been added to the -mm tree.

> +u8 IT8212GetChipStatus(uioctl_t * ioc)
> +{

> + pPhyDiskInfo = kmalloc(sizeof(PHYSICAL_DISK_STATUS) * 4, GFP_KERNEL);
> + if (pPhyDiskInfo == NULL) {
> + printk("IT8212GetChipStatus: error kmalloc for "
> + "PHYSCIAL_DISK_STATUS.\n");
> + return -ENOMEM;
> + }
> + memset(pPhyDiskInfo, 0, sizeof(PHYSICAL_DISK_STATUS));

kmalloc or memset is right wrt size?

Expect patches to fix sparse warnings, remove useless comments,
typedef horrors and other misc stuff in a day or so.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/