aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/storage/datafab.c
diff options
context:
space:
mode:
authorOliver Neukum <oliver@neukum.org>2006-01-08 06:33:45 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2006-03-20 17:49:52 -0500
commit887c2560b6ceb5fe7ac24704e85af507c6d960e5 (patch)
treedd363a707a717bb87c1b89a64ab46b3394524a3f /drivers/usb/storage/datafab.c
parent9ff87d7326d9e4666721070040474f60a68ab467 (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/datafab.c')
-rw-r--r--drivers/usb/storage/datafab.c3
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 }