drm/nouveau/drm/nouveau/mmu: fix odd_ptr_err.cocci warnings
authorChristoph Böhmwalder <christoph@boehmwalder.at>
Thu, 30 Nov 2017 19:53:54 +0000 (20:53 +0100)
committerBen Skeggs <bskeggs@redhat.com>
Fri, 2 Feb 2018 05:24:03 +0000 (15:24 +1000)
commit94ee54dc808aa5a13630b082d6f892d0cf7bf527
tree06ca5aae8bfe7f775d3a93db09cd092881b9d637
parentfe9748b7b41cee11f8db57fb8b20bc540a33102a
drm/nouveau/drm/nouveau/mmu: fix odd_ptr_err.cocci warnings

The kbuild test bot complained about a new coccinelle warning nearby,
which sparked a discussion about the assignment to 'memory' inside of
the conditional expression.  See Link below for the original post.

Fix the assignment to silence the coccinelle warning and also make the
code look a little nicer.

Link: https://lists.freedesktop.org/archives/nouveau/2017-November/029242.html
Signed-off-by: Christoph Böhmwalder <christoph@boehmwalder.at>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
drivers/gpu/drm/nouveau/nvkm/subdev/mmu/uvmm.c