diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2017-05-04 10:29:03 +0300 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2017-05-12 01:32:56 +0300 |
commit | 89ed10a5721d569b053a8355c1a6bd812fed7c29 (patch) | |
tree | 910ea49f545803a15155c1160dc7c7be47ef0eb3 /drivers/gpu/drm | |
parent | 80a92865f2113fe8bc268218b0c4156cfab4c9ac (diff) | |
download | linux-89ed10a5721d569b053a8355c1a6bd812fed7c29.tar.xz |
drm/nouveau/core: fix static checker warning
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>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/core/object.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/core/object.c b/drivers/gpu/drm/nouveau/nvkm/core/object.c index 89d2e9da11c7..acd76fd4f6d8 100644 --- a/drivers/gpu/drm/nouveau/nvkm/core/object.c +++ b/drivers/gpu/drm/nouveau/nvkm/core/object.c @@ -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 |