diff options
-rw-r--r-- | drivers/scsi/scsi.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c index a2ef03243a2c..166417a6afba 100644 --- a/drivers/scsi/scsi.c +++ b/drivers/scsi/scsi.c | |||
@@ -169,12 +169,10 @@ scsi_pool_alloc_command(struct scsi_host_cmd_pool *pool, gfp_t gfp_mask) | |||
169 | { | 169 | { |
170 | struct scsi_cmnd *cmd; | 170 | struct scsi_cmnd *cmd; |
171 | 171 | ||
172 | cmd = kmem_cache_alloc(pool->cmd_slab, gfp_mask | pool->gfp_mask); | 172 | cmd = kmem_cache_zalloc(pool->cmd_slab, gfp_mask | pool->gfp_mask); |
173 | if (!cmd) | 173 | if (!cmd) |
174 | return NULL; | 174 | return NULL; |
175 | 175 | ||
176 | memset(cmd, 0, sizeof(*cmd)); | ||
177 | |||
178 | cmd->sense_buffer = kmem_cache_alloc(pool->sense_slab, | 176 | cmd->sense_buffer = kmem_cache_alloc(pool->sense_slab, |
179 | gfp_mask | pool->gfp_mask); | 177 | gfp_mask | pool->gfp_mask); |
180 | if (!cmd->sense_buffer) { | 178 | if (!cmd->sense_buffer) { |