swiotlb: Fix the type of index
authorClaire Chang <tientzu@chromium.org>
Thu, 22 Apr 2021 08:14:53 +0000 (16:14 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 May 2021 08:29:42 +0000 (10:29 +0200)
commit262adcb7c23092747b541b8f8ff18b6e53a6d50d
treef55bbcbff0ec8ba4b760270dabe856e4d945ae6b
parentebdd1961f8950a6417c2e8ce21555e86882be610
swiotlb: Fix the type of index

[ Upstream commit 95b079d8215b83b37fa59341fda92fcb9392f14a ]

Fix the type of index from unsigned int to int since find_slots() might
return -1.

Fixes: 26a7e094783d ("swiotlb: refactor swiotlb_tbl_map_single")
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Claire Chang <tientzu@chromium.org>
Signed-off-by: Konrad Rzeszutek Wilk <konrad@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
kernel/dma/swiotlb.c