]> git.baikalelectronics.ru Git - kernel.git/commit
sparc/iommu: fix ->map_sg return value
authorChristoph Hellwig <hch@lst.de>
Sun, 16 Dec 2018 09:23:28 +0000 (10:23 +0100)
committerChristoph Hellwig <hch@lst.de>
Wed, 19 Dec 2018 17:00:40 +0000 (18:00 +0100)
commite1ccf2965e255adbba1eee3dca54db3aed8f77f6
treee0107b0da7888fe0fc28ea6b4516e02f075e7996
parentceeb5817b7514baf7730b02c34167c74fe7d94e8
sparc/iommu: fix ->map_sg return value

Just decrementing the sz value will lead to an incorrect return value.
Instead of just introducing a local variable switch to the standard
for_each_sg helper and standard naming of the arguments.

Fixes: 1ed24410be ("sparc: remove the sparc32_dma_ops indirection")
Reported-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
arch/sparc/mm/iommu.c