diff options
Diffstat (limited to 'drivers/usb/storage/shuttle_usbat.c')
-rw-r--r-- | drivers/usb/storage/shuttle_usbat.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/storage/shuttle_usbat.c b/drivers/usb/storage/shuttle_usbat.c index fea176d7e79a..f2bc5c9e23d5 100644 --- a/drivers/usb/storage/shuttle_usbat.c +++ b/drivers/usb/storage/shuttle_usbat.c | |||
@@ -1318,12 +1318,11 @@ int init_usbat(struct us_data *us) | |||
1318 | unsigned char subcountL = USBAT_ATA_LBA_ME; | 1318 | unsigned char subcountL = USBAT_ATA_LBA_ME; |
1319 | unsigned char *status = us->iobuf; | 1319 | unsigned char *status = us->iobuf; |
1320 | 1320 | ||
1321 | us->extra = kmalloc(sizeof(struct usbat_info), GFP_NOIO); | 1321 | us->extra = kzalloc(sizeof(struct usbat_info), GFP_NOIO); |
1322 | if (!us->extra) { | 1322 | if (!us->extra) { |
1323 | US_DEBUGP("init_usbat: Gah! Can't allocate storage for usbat info struct!\n"); | 1323 | US_DEBUGP("init_usbat: Gah! Can't allocate storage for usbat info struct!\n"); |
1324 | return 1; | 1324 | return 1; |
1325 | } | 1325 | } |
1326 | memset(us->extra, 0, sizeof(struct usbat_info)); | ||
1327 | info = (struct usbat_info *) (us->extra); | 1326 | info = (struct usbat_info *) (us->extra); |
1328 | 1327 | ||
1329 | /* Enable peripheral control signals */ | 1328 | /* Enable peripheral control signals */ |