[Freedreno] [PATCH] drm/msm: fix returnvar.cocci warning
Guo Zhengkui
guozhengkui at vivo.com
Mon Apr 25 12:22:21 UTC 2022
Fix the following coccicheck warning:
drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c:24:5-8: Unneeded variable:
"ret". Return "0" on line 75.
Signed-off-by: Guo Zhengkui <guozhengkui at vivo.com>
---
drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c b/drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c
index 3cf476c55158..8ae66facc095 100644
--- a/drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c
+++ b/drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c
@@ -21,7 +21,6 @@ static int mdp4_hw_init(struct msm_kms *kms)
struct drm_device *dev = mdp4_kms->dev;
u32 dmap_cfg, vg_cfg;
unsigned long clk;
- int ret = 0;
pm_runtime_get_sync(dev->dev);
@@ -72,7 +71,7 @@ static int mdp4_hw_init(struct msm_kms *kms)
pm_runtime_put_sync(dev->dev);
- return ret;
+ return 0;
}
static void mdp4_enable_commit(struct msm_kms *kms)
--
2.20.1
More information about the Freedreno
mailing list