diff options
Diffstat (limited to 'drivers/scsi/gdth.c')
-rw-r--r-- | drivers/scsi/gdth.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/scsi/gdth.c b/drivers/scsi/gdth.c index 55e4d2dc2bbe..b20c188cc529 100644 --- a/drivers/scsi/gdth.c +++ b/drivers/scsi/gdth.c | |||
@@ -726,10 +726,10 @@ int __gdth_execute(struct scsi_device *sdev, gdth_cmd_str *gdtcmd, char *cmnd, | |||
726 | DECLARE_COMPLETION_ONSTACK(wait); | 726 | DECLARE_COMPLETION_ONSTACK(wait); |
727 | int rval; | 727 | int rval; |
728 | 728 | ||
729 | scp = kmalloc(sizeof(*scp), GFP_KERNEL); | 729 | scp = kzalloc(sizeof(*scp), GFP_KERNEL); |
730 | if (!scp) | 730 | if (!scp) |
731 | return -ENOMEM; | 731 | return -ENOMEM; |
732 | memset(scp, 0, sizeof(*scp)); | 732 | |
733 | scp->device = sdev; | 733 | scp->device = sdev; |
734 | /* use request field to save the ptr. to completion struct. */ | 734 | /* use request field to save the ptr. to completion struct. */ |
735 | scp->request = (struct request *)&wait; | 735 | scp->request = (struct request *)&wait; |
@@ -5518,10 +5518,9 @@ static int gdth_ioctl(struct inode *inode, struct file *filep, | |||
5518 | ha = HADATA(gdth_ctr_tab[hanum]); | 5518 | ha = HADATA(gdth_ctr_tab[hanum]); |
5519 | 5519 | ||
5520 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) | 5520 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) |
5521 | scp = kmalloc(sizeof(*scp), GFP_KERNEL); | 5521 | scp = kzalloc(sizeof(*scp), GFP_KERNEL); |
5522 | if (!scp) | 5522 | if (!scp) |
5523 | return -ENOMEM; | 5523 | return -ENOMEM; |
5524 | memset(scp, 0, sizeof(*scp)); | ||
5525 | scp->device = ha->sdev; | 5524 | scp->device = ha->sdev; |
5526 | scp->cmd_len = 12; | 5525 | scp->cmd_len = 12; |
5527 | scp->use_sg = 0; | 5526 | scp->use_sg = 0; |