提交 89ed10a5 编写于 作者: B Ben Skeggs

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: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
上级 80a92865
...@@ -295,7 +295,7 @@ nvkm_object_ctor(const struct nvkm_object_func *func, ...@@ -295,7 +295,7 @@ nvkm_object_ctor(const struct nvkm_object_func *func,
INIT_LIST_HEAD(&object->head); INIT_LIST_HEAD(&object->head);
INIT_LIST_HEAD(&object->tree); INIT_LIST_HEAD(&object->tree);
RB_CLEAR_NODE(&object->node); RB_CLEAR_NODE(&object->node);
WARN_ON(oclass->engine && !object->engine); WARN_ON(IS_ERR(object->engine));
} }
int int
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册