diff options
Diffstat (limited to 'drivers/usb/storage/isd200.c')
-rw-r--r-- | drivers/usb/storage/isd200.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/usb/storage/isd200.c b/drivers/usb/storage/isd200.c index ecb328aa9ea1..6831dca93c1b 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) { |
@@ -1384,7 +1382,7 @@ static int isd200_init_info(struct us_data *us) | |||
1384 | } else | 1382 | } else |
1385 | US_DEBUGP("ERROR - kmalloc failure\n"); | 1383 | US_DEBUGP("ERROR - kmalloc failure\n"); |
1386 | 1384 | ||
1387 | return(retStatus); | 1385 | return retStatus; |
1388 | } | 1386 | } |
1389 | 1387 | ||
1390 | /************************************************************************** | 1388 | /************************************************************************** |