]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/nouveau/core: fix static checker warning
authorBen Skeggs <bskeggs@redhat.com>
Thu, 4 May 2017 07:29:03 +0000 (17:29 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Thu, 11 May 2017 22:32:56 +0000 (08:32 +1000)
object->engine cannot be NULL, it's either valid, or an error pointer.

This particular condition shouldn't actually be possible, but just in
case, we'll keep it.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nvkm/core/object.c

index 89d2e9da11c78aba5514acd1ec078b06475ae5f4..acd76fd4f6d85eab1fe6fea719a888f93725c575 100644 (file)
@@ -295,7 +295,7 @@ nvkm_object_ctor(const struct nvkm_object_func *func,
        INIT_LIST_HEAD(&object->head);
        INIT_LIST_HEAD(&object->tree);
        RB_CLEAR_NODE(&object->node);
-       WARN_ON(oclass->engine && !object->engine);
+       WARN_ON(IS_ERR(object->engine));
 }
 
 int