summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2013-03-19 09:57:57 +1000
committerBen Skeggs <bskeggs@redhat.com>2013-03-19 15:26:30 +1000
commit4fa133954e91b83cfa22947579154c6f16e1b2b4 (patch)
treeea903fa9a50edc926597f2f841a23aa5150f5487 /drivers/gpu
parent804ca90f3fe35dd7c12889eaa74a44abbc4b91fd (diff)
downloadblackbird-op-linux-4fa133954e91b83cfa22947579154c6f16e1b2b4.tar.gz
blackbird-op-linux-4fa133954e91b83cfa22947579154c6f16e1b2b4.zip
drm/nouveau/core: fix return value of nouveau_object_del()
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/nouveau/core/core/object.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/core/core/object.c b/drivers/gpu/drm/nouveau/core/core/object.c
index 0daab62ea14c..3b2e7b6304d3 100644
--- a/drivers/gpu/drm/nouveau/core/core/object.c
+++ b/drivers/gpu/drm/nouveau/core/core/object.c
@@ -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)
@@ -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
OpenPOWER on IntegriCloud