[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220831033301.302121-1-ye.xingchen@zte.com.cn>
Date: Wed, 31 Aug 2022 03:33:01 +0000
From: cgel.zte@...il.com
To: airlied@...ux.ie
Cc: maarten.lankhorst@...ux.intel.com, mripard@...nel.org,
tzimmermann@...e.de, daniel@...ll.ch,
dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
ye xingchen <ye.xingchen@....com.cn>,
Zeal Robot <zealci@....com.cn>
Subject: [PATCH linux-next] drm/gem: Remove the unneeded result variable
From: ye xingchen <ye.xingchen@....com.cn>
Return the value drm_gem_handle_delete() directly instead of storing it
in another redundant variable.
Reported-by: Zeal Robot <zealci@....com.cn>
Signed-off-by: ye xingchen <ye.xingchen@....com.cn>
---
drivers/gpu/drm/drm_gem.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c
index ad068865ba20..3fa0deff3014 100644
--- a/drivers/gpu/drm/drm_gem.c
+++ b/drivers/gpu/drm/drm_gem.c
@@ -782,14 +782,11 @@ drm_gem_close_ioctl(struct drm_device *dev, void *data,
struct drm_file *file_priv)
{
struct drm_gem_close *args = data;
- int ret;
if (!drm_core_check_feature(dev, DRIVER_GEM))
return -EOPNOTSUPP;
- ret = drm_gem_handle_delete(file_priv, args->handle);
-
- return ret;
+ return drm_gem_handle_delete(file_priv, args->handle);
}
/**
--
2.25.1
Powered by blists - more mailing lists