amdgpu: Check whether pointer is valid

In amdgpu_bo_cpu_map() check if the caller has set
the pointer to a pointer argument named "cpu"
before assigning to it.

Sometimes it is useful to use this function to map
a bo, without immediately needing its CPU pointer,
like this:

res = amdgpu_bo_cpu_map(bo, NULL);

Signed-off-by: Luben Tuikov <luben.tuikov@amd.com>
6 jobs for luben-work in 3 minutes and 54 seconds (queued for 1 second)
Status Job ID Name Coverage
  Containers
passed #1487434
debian

00:00:24

 
  Build
passed #1487437
meson-aarch64

00:01:15

passed #1487438
meson-armhf

00:01:16

passed #1487436
meson-i386

00:03:28

passed #1487439
meson-ppc64el

00:01:12

passed #1487435
meson-x86_64

00:03:02