drm/nouveau/secboot: fix inconsistent pointer checking
authorAlexandre Courbot <acourbot@nvidia.com>
Wed, 15 Mar 2017 05:44:34 +0000 (14:44 +0900)
committerDave Airlie <airlied@redhat.com>
Fri, 17 Mar 2017 00:08:24 +0000 (10:08 +1000)
commitaa7fc0ca759eb25eea6dc0fee4373e5883a17498
tree28e38930e2446e3a9e201a2e0bd5b30a4be3768f
parent9c233760a65cec0c98df7b62bc5185d8889e5fc7
drm/nouveau/secboot: fix inconsistent pointer checking

We were returning PTR_ERR() on a NULL pointer, which obviously won't
work. nvkm_engine_ref() will return an error in case something went
wrong.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gp102.c