Unverified Commit 0e9c3469 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files
parents 70857ee4 b066f003
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1063,7 +1063,7 @@ sba_unmap_sg(struct device *dev, struct scatterlist *sglist, int nents,
	spin_unlock_irqrestore(&ioc->res_lock, flags);
#endif

	while (sg_dma_len(sglist) && nents--) {
	while (nents && sg_dma_len(sglist)) {

		sba_unmap_page(dev, sg_dma_address(sglist), sg_dma_len(sglist),
				direction, 0);
@@ -1072,6 +1072,7 @@ sba_unmap_sg(struct device *dev, struct scatterlist *sglist, int nents,
		ioc->usingle_calls--;	/* kluge since call is unmap_sg() */
#endif
		++sglist;
		nents--;
	}

	DBG_RUN_SG("%s() DONE (nents %d)\n", __func__,  nents);