Skip to content

Commit

Permalink
drm/nouveau/core: fix return value of nouveau_object_del()
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
  • Loading branch information
Ben Skeggs committed Mar 19, 2013
1 parent 804ca90 commit 4fa1339
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/gpu/drm/nouveau/core/core/object.c
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,6 @@ nouveau_object_del(struct nouveau_object *client, u32 _parent, u32 _handle)
struct nouveau_object *parent = NULL;
struct nouveau_object *namedb = NULL;
struct nouveau_handle *handle = NULL;
int ret = -EINVAL;

parent = nouveau_handle_ref(client, _parent);
if (!parent)
Expand All @@ -295,7 +294,7 @@ nouveau_object_del(struct nouveau_object *client, u32 _parent, u32 _handle)
}

nouveau_object_ref(NULL, &parent);
return ret;
return handle ? 0 : -EINVAL;
}

int
Expand Down

0 comments on commit 4fa1339

Please sign in to comment.