diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2010-10-11 20:11:00 -0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2010-12-03 00:05:27 -0500 |
commit | 18a16a768c3d37f5bfdbb414217b530294d5d442 (patch) | |
tree | 70574a519558bdd78a93acb06e0cd51296085c18 /drivers/gpu/drm/nouveau/nouveau_object.c | |
parent | 938c40ed69b2c1eceb72247b5e8975b28afc195f (diff) |
drm/nouveau: return error from nouveau_ramht_remove() if not found
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_object.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_object.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_object.c b/drivers/gpu/drm/nouveau/nouveau_object.c index 068441c4b563..ce9958a30175 100644 --- a/drivers/gpu/drm/nouveau/nouveau_object.c +++ b/drivers/gpu/drm/nouveau/nouveau_object.c | |||
@@ -926,20 +926,14 @@ int nouveau_ioctl_gpuobj_free(struct drm_device *dev, void *data, | |||
926 | struct drm_file *file_priv) | 926 | struct drm_file *file_priv) |
927 | { | 927 | { |
928 | struct drm_nouveau_gpuobj_free *objfree = data; | 928 | struct drm_nouveau_gpuobj_free *objfree = data; |
929 | struct nouveau_gpuobj *gpuobj; | ||
930 | struct nouveau_channel *chan; | 929 | struct nouveau_channel *chan; |
931 | int ret = -ENOENT; | 930 | int ret; |
932 | 931 | ||
933 | chan = nouveau_channel_get(dev, file_priv, objfree->channel); | 932 | chan = nouveau_channel_get(dev, file_priv, objfree->channel); |
934 | if (IS_ERR(chan)) | 933 | if (IS_ERR(chan)) |
935 | return PTR_ERR(chan); | 934 | return PTR_ERR(chan); |
936 | 935 | ||
937 | gpuobj = nouveau_ramht_find(chan, objfree->handle); | 936 | ret = nouveau_ramht_remove(chan, objfree->handle); |
938 | if (gpuobj) { | ||
939 | nouveau_ramht_remove(chan, objfree->handle); | ||
940 | ret = 0; | ||
941 | } | ||
942 | |||
943 | nouveau_channel_put(&chan); | 937 | nouveau_channel_put(&chan); |
944 | return ret; | 938 | return ret; |
945 | } | 939 | } |