Commit fce24200 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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
parents 0f464869 5cb782ff
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -243,7 +243,7 @@ int ufshcd_mcq_memory_alloc(struct ufs_hba *hba)
		hwq->sqe_base_addr = dmam_alloc_coherent(hba->dev, utrdl_size,
							 &hwq->sqe_dma_addr,
							 GFP_KERNEL);
		if (!hwq->sqe_dma_addr) {
		if (!hwq->sqe_base_addr) {
			dev_err(hba->dev, "SQE allocation failed\n");
			return -ENOMEM;
		}
@@ -252,7 +252,7 @@ int ufshcd_mcq_memory_alloc(struct ufs_hba *hba)
		hwq->cqe_base_addr = dmam_alloc_coherent(hba->dev, cqe_size,
							 &hwq->cqe_dma_addr,
							 GFP_KERNEL);
		if (!hwq->cqe_dma_addr) {
		if (!hwq->cqe_base_addr) {
			dev_err(hba->dev, "CQE allocation failed\n");
			return -ENOMEM;
		}