mirror of https://gitee.com/openkylin/linux.git
swiotlb: Fix the type of index
Fix the type of index from unsigned int to int since find_slots() might
return -1.
Fixes: 26a7e09478
("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>
This commit is contained in:
parent
2726bf3ff2
commit
95b079d821
|
@ -499,7 +499,8 @@ phys_addr_t swiotlb_tbl_map_single(struct device *dev, phys_addr_t orig_addr,
|
|||
{
|
||||
struct io_tlb_mem *mem = io_tlb_default_mem;
|
||||
unsigned int offset = swiotlb_align_offset(dev, orig_addr);
|
||||
unsigned int index, i;
|
||||
unsigned int i;
|
||||
int index;
|
||||
phys_addr_t tlb_addr;
|
||||
|
||||
if (!mem)
|
||||
|
|
Loading…
Reference in New Issue