-
由 Robin Murphy 提交于
Assigning the device's dma_range_map from the iterator variable after the loop means it always points to the empty terminator at the end of the map, which is not what we want. Similarly, freeing the iterator on error when it points to somwhere in the middle of the allocated array won't work either. Fix this. Fixes: bf2ee8d0 ("ACPI: scan: Support multiple DMA windows with different offsets") Signed-off-by: NRobin Murphy <robin.murphy@arm.com> Reviewed-by: NJianmin Lv <lvjianmin@loongson.cn> Tested-by: NJeremy Linton <jeremy.linton@arm.com> Tested-by: NYicong Yang <yangyicong@hisilicon.com> Reviewed-by: NLorenzo Pieralisi <lpieralisi@kernel.org> Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
64d23ff3