Skip to content

Commit fce2420

Browse files
committed
Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Pull SCSI fix from James Bottomley: "One driver fix for a dma error checking thinko" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: ufs: mcq: Fix memory allocation checks for SQE and CQE
2 parents 0f46486 + 5cb782f commit fce2420

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/ufs/core/ufs-mcq.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ int ufshcd_mcq_memory_alloc(struct ufs_hba *hba)
243243
hwq->sqe_base_addr = dmam_alloc_coherent(hba->dev, utrdl_size,
244244
&hwq->sqe_dma_addr,
245245
GFP_KERNEL);
246-
if (!hwq->sqe_dma_addr) {
246+
if (!hwq->sqe_base_addr) {
247247
dev_err(hba->dev, "SQE allocation failed\n");
248248
return -ENOMEM;
249249
}
@@ -252,7 +252,7 @@ int ufshcd_mcq_memory_alloc(struct ufs_hba *hba)
252252
hwq->cqe_base_addr = dmam_alloc_coherent(hba->dev, cqe_size,
253253
&hwq->cqe_dma_addr,
254254
GFP_KERNEL);
255-
if (!hwq->cqe_dma_addr) {
255+
if (!hwq->cqe_base_addr) {
256256
dev_err(hba->dev, "CQE allocation failed\n");
257257
return -ENOMEM;
258258
}

0 commit comments

Comments
 (0)