Merge branch 'x86-mce-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[firefly-linux-kernel-4.4.55.git] / drivers / scsi / scsi.c
index a2ef03243a2c3d53d5fc719be830a4e42eebdea1..2de5f3ad640b2da78eba5401454c8415f44841e4 100644 (file)
@@ -169,12 +169,10 @@ scsi_pool_alloc_command(struct scsi_host_cmd_pool *pool, gfp_t gfp_mask)
 {
        struct scsi_cmnd *cmd;
 
-       cmd = kmem_cache_alloc(pool->cmd_slab, gfp_mask | pool->gfp_mask);
+       cmd = kmem_cache_zalloc(pool->cmd_slab, gfp_mask | pool->gfp_mask);
        if (!cmd)
                return NULL;
 
-       memset(cmd, 0, sizeof(*cmd));
-
        cmd->sense_buffer = kmem_cache_alloc(pool->sense_slab,
                                             gfp_mask | pool->gfp_mask);
        if (!cmd->sense_buffer) {
@@ -1227,8 +1225,8 @@ EXPORT_SYMBOL(__scsi_device_lookup_by_target);
  * @starget:   SCSI target pointer
  * @lun:       SCSI Logical Unit Number
  *
- * Description: Looks up the scsi_device with the specified @channel, @id, @lun
- * for a given host.  The returned scsi_device has an additional reference that
+ * Description: Looks up the scsi_device with the specified @lun for a given
+ * @starget.  The returned scsi_device has an additional reference that
  * needs to be released with scsi_device_put once you're done with it.
  **/
 struct scsi_device *scsi_device_lookup_by_target(struct scsi_target *starget,