提交 4fa13395 编写于 作者: B Ben Skeggs

drm/nouveau/core: fix return value of nouveau_object_del()

Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
上级 804ca90f
...@@ -278,7 +278,6 @@ nouveau_object_del(struct nouveau_object *client, u32 _parent, u32 _handle) ...@@ -278,7 +278,6 @@ nouveau_object_del(struct nouveau_object *client, u32 _parent, u32 _handle)
struct nouveau_object *parent = NULL; struct nouveau_object *parent = NULL;
struct nouveau_object *namedb = NULL; struct nouveau_object *namedb = NULL;
struct nouveau_handle *handle = NULL; struct nouveau_handle *handle = NULL;
int ret = -EINVAL;
parent = nouveau_handle_ref(client, _parent); parent = nouveau_handle_ref(client, _parent);
if (!parent) if (!parent)
...@@ -295,7 +294,7 @@ nouveau_object_del(struct nouveau_object *client, u32 _parent, u32 _handle) ...@@ -295,7 +294,7 @@ nouveau_object_del(struct nouveau_object *client, u32 _parent, u32 _handle)
} }
nouveau_object_ref(NULL, &parent); nouveau_object_ref(NULL, &parent);
return ret; return handle ? 0 : -EINVAL;
} }
int int
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册