diff options
author | Jaroslav Kysela <perex@suse.cz> | 2006-03-22 05:02:08 -0500 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-03-22 05:02:08 -0500 |
commit | 5501972e0b5857bc8354770d900ceb9b40c7f6b7 (patch) | |
tree | ff239422827c4cd54d2998f8851304255de31b38 /drivers/usb/storage/datafab.c | |
parent | 9d2f928ddf64ca0361562e30faf584cd33055c60 (diff) | |
parent | e952f31bce6e9f64db01f607abc46529ba57ac9e (diff) |
Merge with rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Diffstat (limited to 'drivers/usb/storage/datafab.c')
-rw-r--r-- | drivers/usb/storage/datafab.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/storage/datafab.c b/drivers/usb/storage/datafab.c index 54e3e6c7ecd8..01d8971ad7db 100644 --- a/drivers/usb/storage/datafab.c +++ b/drivers/usb/storage/datafab.c | |||
@@ -512,13 +512,12 @@ int datafab_transport(struct scsi_cmnd * srb, struct us_data *us) | |||
512 | }; | 512 | }; |
513 | 513 | ||
514 | if (!us->extra) { | 514 | if (!us->extra) { |
515 | us->extra = kmalloc(sizeof(struct datafab_info), GFP_NOIO); | 515 | us->extra = kzalloc(sizeof(struct datafab_info), GFP_NOIO); |
516 | if (!us->extra) { | 516 | if (!us->extra) { |
517 | US_DEBUGP("datafab_transport: Gah! " | 517 | US_DEBUGP("datafab_transport: Gah! " |
518 | "Can't allocate storage for Datafab info struct!\n"); | 518 | "Can't allocate storage for Datafab info struct!\n"); |
519 | return USB_STOR_TRANSPORT_ERROR; | 519 | return USB_STOR_TRANSPORT_ERROR; |
520 | } | 520 | } |
521 | memset(us->extra, 0, sizeof(struct datafab_info)); | ||
522 | us->extra_destructor = datafab_info_destructor; | 521 | us->extra_destructor = datafab_info_destructor; |
523 | ((struct datafab_info *)us->extra)->lun = -1; | 522 | ((struct datafab_info *)us->extra)->lun = -1; |
524 | } | 523 | } |