* [PATCH] drm/gem: Remove unneeded ret check in change handle ioctl
@ 2026-05-11 14:25 Jonathan Cavitt
0 siblings, 0 replies; only message in thread
From: Jonathan Cavitt @ 2026-05-11 14:25 UTC (permalink / raw)
To: dri-devel
Cc: saurabhg.gupta, alex.zuo, jonathan.cavitt, maarten.lankhorst,
mripard, tzimmermann, airlied, simona, linux-kernel
Remove the "if (ret < 0)" branch after idr_replace in
drm_gem_change_handle_ioctl. It is unused, as in the only place we
modify the return value between there and the previous return value
check, we also immediately jump to out_unlock, bypassing the check
entirely.
Issue caught by static analysis.
Signed-off-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: David Airlie <airlied@gmail.com>
Cc: Simona Vetter <simona@ffwll.ch>
---
drivers/gpu/drm/drm_gem.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c
index abc8e41d6652..110bc5a58862 100644
--- a/drivers/gpu/drm/drm_gem.c
+++ b/drivers/gpu/drm/drm_gem.c
@@ -1067,9 +1067,6 @@ int drm_gem_change_handle_ioctl(struct drm_device *dev, void *data,
spin_unlock(&file_priv->table_lock);
- if (ret < 0)
- goto out_unlock;
-
if (obj->dma_buf) {
ret = drm_prime_add_buf_handle(&file_priv->prime, obj->dma_buf,
handle);
--
2.53.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-05-11 14:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-11 14:25 [PATCH] drm/gem: Remove unneeded ret check in change handle ioctl Jonathan Cavitt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox