[PATCH] USB: kzalloc for storage

another one for kzalloc. This covers the storage subdirectory.

Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Oliver Neukum
2006-01-08 12:33:45 +01:00
committed by Greg Kroah-Hartman
parent 9ff87d7326
commit 887c2560b6
5 changed files with 7 additions and 13 deletions

View File

@ -1361,21 +1361,19 @@ static int isd200_init_info(struct us_data *us)
struct isd200_info *info;
info = (struct isd200_info *)
kmalloc(sizeof(struct isd200_info), GFP_KERNEL);
kzalloc(sizeof(struct isd200_info), GFP_KERNEL);
if (!info)
retStatus = ISD200_ERROR;
else {
memset(info, 0, sizeof(struct isd200_info));
info->id = (struct hd_driveid *)
kmalloc(sizeof(struct hd_driveid), GFP_KERNEL);
kzalloc(sizeof(struct hd_driveid), GFP_KERNEL);
info->RegsBuf = (unsigned char *)
kmalloc(sizeof(info->ATARegs), GFP_KERNEL);
if (!info->id || !info->RegsBuf) {
isd200_free_info_ptrs(info);
kfree(info);
retStatus = ISD200_ERROR;
} else
memset(info->id, 0, sizeof(struct hd_driveid));
}
}
if (retStatus == ISD200_GOOD) {