drm/radeon: Remove the unneeded result variable
authorye xingchen <ye.xingchen@zte.com.cn>
Fri, 2 Sep 2022 07:33:20 +0000 (07:33 +0000)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 13 Sep 2022 18:32:58 +0000 (14:32 -0400)
Return the value radeon_drm_ioctl() directly instead of storing it in
another redundant variable.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/radeon/radeon_drv.c

index a28d5ceab628be40af343daff088b9f6d4f381b5..6cbe1ab81abad7217681438666e10860c5d5b323 100644 (file)
@@ -512,14 +512,11 @@ long radeon_drm_ioctl(struct file *filp,
 static long radeon_kms_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
 {
        unsigned int nr = DRM_IOCTL_NR(cmd);
-       int ret;
 
        if (nr < DRM_COMMAND_BASE)
                return drm_compat_ioctl(filp, cmd, arg);
 
-       ret = radeon_drm_ioctl(filp, cmd, arg);
-
-       return ret;
+       return radeon_drm_ioctl(filp, cmd, arg);
 }
 #endif