aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_lib.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2015-01-26 18:48:08 -0500
committerDave Airlie <airlied@redhat.com>2015-01-26 18:48:08 -0500
commit22cbbceff65cb03ee37495b52f360809fa439293 (patch)
tree59ee71a72328743242a2357b0a0af8697d1640e4 /drivers/scsi/scsi_lib.c
parent104b61590dcd5f71ff518e2b820e1cdf9d0350f2 (diff)
parent26bc420b59a38e4e6685a73345a0def461136dce (diff)
Merge tag 'v3.19-rc6' into drm-fixes
Linux 3.19-rc6 pull in rc6 as the amdkfd fixes are based on it, and I'd rather be doing the merges separately
Diffstat (limited to 'drivers/scsi/scsi_lib.c')
-rw-r--r--drivers/scsi/scsi_lib.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 6d5c0b8cb0bb..17bb541f7cc2 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -1143,7 +1143,17 @@ int scsi_init_io(struct scsi_cmnd *cmd)
1143 struct scsi_data_buffer *prot_sdb = cmd->prot_sdb; 1143 struct scsi_data_buffer *prot_sdb = cmd->prot_sdb;
1144 int ivecs, count; 1144 int ivecs, count;
1145 1145
1146 BUG_ON(prot_sdb == NULL); 1146 if (prot_sdb == NULL) {
1147 /*
1148 * This can happen if someone (e.g. multipath)
1149 * queues a command to a device on an adapter
1150 * that does not support DIX.
1151 */
1152 WARN_ON_ONCE(1);
1153 error = BLKPREP_KILL;
1154 goto err_exit;
1155 }
1156
1147 ivecs = blk_rq_count_integrity_sg(rq->q, rq->bio); 1157 ivecs = blk_rq_count_integrity_sg(rq->q, rq->bio);
1148 1158
1149 if (scsi_alloc_sgtable(prot_sdb, ivecs, is_mq)) { 1159 if (scsi_alloc_sgtable(prot_sdb, ivecs, is_mq)) {