diff mbox series

drm/msm: fix returnvar.cocci warning

Message ID 20220425122223.7415-1-guozhengkui@vivo.com (mailing list archive)
State New, archived
Headers show
Series drm/msm: fix returnvar.cocci warning | expand

Commit Message

Guo Zhengkui April 25, 2022, 12:22 p.m. UTC
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@vivo.com>
---
 drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Stephen Boyd April 25, 2022, 8:24 p.m. UTC | #1
Quoting Guo Zhengkui (2022-04-25 05:22:21)
> 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@vivo.com>
> ---

Reviewed-by: Stephen Boyd <swboyd@chromium.org>
diff mbox series

Patch

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)