drm/nouveau: use post-decrement in error handling
authorRasmus Villemoes <linux@rasmusvillemoes.dk>
Mon, 15 Feb 2016 18:41:46 +0000 (19:41 +0100)
committerDave Airlie <airlied@redhat.com>
Fri, 19 Feb 2016 03:36:05 +0000 (13:36 +1000)
commit4fbbed46dca83bcba3a0170205110a06c116a8e6
tree446e525b609222a41fb398993131b9a5d25e1abd
parent5fff80bbdb6b84a94f90391ba674471d37b57eb2
drm/nouveau: use post-decrement in error handling

We need to use post-decrement to get the dma_map_page undone also for
i==0, and to avoid some very unpleasant behaviour if dma_map_page
failed already at i==0.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Reviewed-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/nouveau/nouveau_bo.c