drm/radeon: use post-decrement in error handling
authorRasmus Villemoes <linux@rasmusvillemoes.dk>
Mon, 15 Feb 2016 18:41:47 +0000 (19:41 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Mar 2016 23:06:24 +0000 (15:06 -0800)
commita81bfc00a3f9eb778bad0d97551d91c332ec2f1b
tree63191cd42771f636277aca7198a4cba04f2c89ae
parent8d5e1e5af0c667545c202e8f4051f77aa3bf31b7
drm/radeon: use post-decrement in error handling

commit bc3f5d8c4ca01555820617eb3b6c0857e4df710d upstream.

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

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/radeon/radeon_ttm.c