diff options
author | Oliver Neukum <oliver@neukum.org> | 2006-01-08 06:33:45 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-03-20 17:49:52 -0500 |
commit | 887c2560b6ceb5fe7ac24704e85af507c6d960e5 (patch) | |
tree | dd363a707a717bb87c1b89a64ab46b3394524a3f /drivers/usb/storage/isd200.c | |
parent | 9ff87d7326d9e4666721070040474f60a68ab467 (diff) |
[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>
Diffstat (limited to 'drivers/usb/storage/isd200.c')
-rw-r--r-- | drivers/usb/storage/isd200.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/usb/storage/isd200.c b/drivers/usb/storage/isd200.c index ecb328aa9ea1..7308e8cbe8f9 100644 --- a/drivers/usb/storage/isd200.c +++ b/drivers/usb/storage/isd200.c | |||
@@ -1361,21 +1361,19 @@ static int isd200_init_info(struct us_data *us) | |||
1361 | struct isd200_info *info; | 1361 | struct isd200_info *info; |
1362 | 1362 | ||
1363 | info = (struct isd200_info *) | 1363 | info = (struct isd200_info *) |
1364 | kmalloc(sizeof(struct isd200_info), GFP_KERNEL); | 1364 | kzalloc(sizeof(struct isd200_info), GFP_KERNEL); |
1365 | if (!info) | 1365 | if (!info) |
1366 | retStatus = ISD200_ERROR; | 1366 | retStatus = ISD200_ERROR; |
1367 | else { | 1367 | else { |
1368 | memset(info, 0, sizeof(struct isd200_info)); | ||
1369 | info->id = (struct hd_driveid *) | 1368 | info->id = (struct hd_driveid *) |
1370 | kmalloc(sizeof(struct hd_driveid), GFP_KERNEL); | 1369 | kzalloc(sizeof(struct hd_driveid), GFP_KERNEL); |
1371 | info->RegsBuf = (unsigned char *) | 1370 | info->RegsBuf = (unsigned char *) |
1372 | kmalloc(sizeof(info->ATARegs), GFP_KERNEL); | 1371 | kmalloc(sizeof(info->ATARegs), GFP_KERNEL); |
1373 | if (!info->id || !info->RegsBuf) { | 1372 | if (!info->id || !info->RegsBuf) { |
1374 | isd200_free_info_ptrs(info); | 1373 | isd200_free_info_ptrs(info); |
1375 | kfree(info); | 1374 | kfree(info); |
1376 | retStatus = ISD200_ERROR; | 1375 | retStatus = ISD200_ERROR; |
1377 | } else | 1376 | } |
1378 | memset(info->id, 0, sizeof(struct hd_driveid)); | ||
1379 | } | 1377 | } |
1380 | 1378 | ||
1381 | if (retStatus == ISD200_GOOD) { | 1379 | if (retStatus == ISD200_GOOD) { |