Skip to content

Commit

Permalink
drm/nouveau/core: fix static checker warning
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Ben Skeggs <[email protected]>
  • Loading branch information
Ben Skeggs committed May 11, 2017
1 parent 80a9286 commit 89ed10a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/nouveau/nvkm/core/object.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 89ed10a

Please sign in to comment.