drm/mediatek: Remove the unneeded result
authorye xingchen <ye.xingchen@zte.com.cn>
Thu, 25 Aug 2022 07:23:35 +0000 (07:23 +0000)
committerChun-Kuang Hu <chunkuang.hu@kernel.org>
Thu, 25 Aug 2022 23:34:49 +0000 (07:34 +0800)
Return the value drm_mode_config_helper_suspend() 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>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20220825072335.228921-1-ye.xingchen@zte.com.cn/
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
drivers/gpu/drm/mediatek/mtk_drm_drv.c

index 0e4c777..9251581 100644 (file)
@@ -833,11 +833,8 @@ static int mtk_drm_sys_prepare(struct device *dev)
 {
        struct mtk_drm_private *private = dev_get_drvdata(dev);
        struct drm_device *drm = private->drm;
-       int ret;
-
-       ret = drm_mode_config_helper_suspend(drm);
 
-       return ret;
+       return drm_mode_config_helper_suspend(drm);
 }
 
 static void mtk_drm_sys_complete(struct device *dev)