gpu: drm: Optimize the unused variable ret
PATCH 1/1 gpu: drm: Optimize the unused variable ret
Use zero as the return value instead of the unused variable ret
Signed-off-by Li Dong <[email protected]>
--- drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c +1 -2
@@ -66,7 +66,6 @@ static void s6d7aa0_reset(struct s6d7aa0 *ctx)static int s6d7aa0_lock (struct s6d7aa0 *ctx,bool lock) {struct mipi_dsi_device *dsi = ctx->dsi; -int ret =0 ;if (lock) {mipi_dsi_dcs_write_seq (dsi,MCS_PASSWD1 ,0xa5 ,0xa5 );
@@ -80,7 +79,7 @@ static int s6d7aa0_lock(struct s6d7aa0 *ctx, bool lock)mipi_dsi_dcs_write_seq (dsi,MCS_PASSWD3 ,0xa5 ,0xa5 ); } -return ret; +return 0 ; }static int s6d7aa0_on (struct s6d7aa0 *ctx)
Signature · 1 line
2.31.1.windows.1
Artur Weber
maintainerQuoted 20 lines · Li Dong
Use zero as the return value instead of the unused variable ret
Signed-off-by Li Dong <[email protected]>--- drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c +0
-1@@ -66,7 +66,6 @@ static void s6d7aa0_reset(struct s6d7aa0 *ctx)static int s6d7aa0_lock (struct s6d7aa0 *ctx,bool lock) {struct mipi_dsi_device *dsi = ctx->dsi; -int ret =0 ;if (lock) {mipi_dsi_dcs_write_seq (dsi,MCS_PASSWD1 ,0xa5 ,0xa5 );
drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c static int s6d7aa0_lock(struct s6d7aa0 *ctx, bool lock) · line 85
Quoted 8 lines
drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c +1
-1@@ -80,7 +79,7 @@ static int s6d7aa0_lock(struct s6d7aa0 *ctx, bool lock)mipi_dsi_dcs_write_seq (dsi,MCS_PASSWD3 ,0xa5 ,0xa5 ); } -return ret; +return 0 ; }static int s6d7aa0_on (struct s6d7aa0 *ctx)
Commit "drm/panel: s6d7aa0: remove the unneeded variable in s6d7aa0_lock"[1] already does this.
Best regards
Artur