diff mbox series

drm/panel: vtdr6130: fix unused ret in visionox_vtdr6130_bl_update_status

Message ID 20230119-topic-sm8550-vtdr6130-fixup-v1-1-82c4fb008138@linaro.org (mailing list archive)
State New, archived
Headers show
Series drm/panel: vtdr6130: fix unused ret in visionox_vtdr6130_bl_update_status | expand

Commit Message

Neil Armstrong Jan. 19, 2023, 2:04 p.m. UTC
Fix the following warning:
panel-visionox-vtdr6130.c:249:12: warning: 'ret' is used uninitialized [-Wuninitialized]

Fixes: 9402cde9347e ("drm/panel: vtdr6130: Use 16-bit brightness function")
Reported-by: Daniel Vetter <daniel@ffwll.ch>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
---
 drivers/gpu/drm/panel/panel-visionox-vtdr6130.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)


---
base-commit: 43bde505d66a41c2ad706d603e97b2c8aa2fbe4a
change-id: 20230119-topic-sm8550-vtdr6130-fixup-fb25f686ba59

Best regards,

Comments

Sam Ravnborg Jan. 19, 2023, 2:08 p.m. UTC | #1
On Thu, Jan 19, 2023 at 03:04:12PM +0100, Neil Armstrong wrote:
> Fix the following warning:
> panel-visionox-vtdr6130.c:249:12: warning: 'ret' is used uninitialized [-Wuninitialized]
> 
> Fixes: 9402cde9347e ("drm/panel: vtdr6130: Use 16-bit brightness function")
> Reported-by: Daniel Vetter <daniel@ffwll.ch>
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
> ---
>  drivers/gpu/drm/panel/panel-visionox-vtdr6130.c | 7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/panel/panel-visionox-vtdr6130.c b/drivers/gpu/drm/panel/panel-visionox-vtdr6130.c
> index 1092075b31a5..bb0dfd86ea67 100644
> --- a/drivers/gpu/drm/panel/panel-visionox-vtdr6130.c
> +++ b/drivers/gpu/drm/panel/panel-visionox-vtdr6130.c
> @@ -243,13 +243,8 @@ static int visionox_vtdr6130_bl_update_status(struct backlight_device *bl)
>  {
>  	struct mipi_dsi_device *dsi = bl_get_data(bl);
>  	u16 brightness = backlight_get_brightness(bl);
> -	int ret;
>  
> -	mipi_dsi_dcs_set_display_brightness_large(dsi, brightness);
> -	if (ret < 0)
> -		return ret;
> -
> -	return 0;
> +	return mipi_dsi_dcs_set_display_brightness_large(dsi, brightness);
>  }
>  
>  static const struct backlight_ops visionox_vtdr6130_bl_ops = {
> 
> ---
> base-commit: 43bde505d66a41c2ad706d603e97b2c8aa2fbe4a
> change-id: 20230119-topic-sm8550-vtdr6130-fixup-fb25f686ba59
> 
> Best regards,
> -- 
> Neil Armstrong <neil.armstrong@linaro.org>
Neil Armstrong Jan. 19, 2023, 2:33 p.m. UTC | #2
Hi,

On Thu, 19 Jan 2023 15:04:12 +0100, Neil Armstrong wrote:
> Fix the following warning:
> panel-visionox-vtdr6130.c:249:12: warning: 'ret' is used uninitialized [-Wuninitialized]
> 
> 

Thanks, Applied to https://anongit.freedesktop.org/git/drm/drm-misc.git (drm-misc-next)

[1/1] drm/panel: vtdr6130: fix unused ret in visionox_vtdr6130_bl_update_status
      https://cgit.freedesktop.org/drm/drm-misc/commit/?id=ebd05c0e12edc568243056711ce00f79e19eab68
diff mbox series

Patch

diff --git a/drivers/gpu/drm/panel/panel-visionox-vtdr6130.c b/drivers/gpu/drm/panel/panel-visionox-vtdr6130.c
index 1092075b31a5..bb0dfd86ea67 100644
--- a/drivers/gpu/drm/panel/panel-visionox-vtdr6130.c
+++ b/drivers/gpu/drm/panel/panel-visionox-vtdr6130.c
@@ -243,13 +243,8 @@  static int visionox_vtdr6130_bl_update_status(struct backlight_device *bl)
 {
 	struct mipi_dsi_device *dsi = bl_get_data(bl);
 	u16 brightness = backlight_get_brightness(bl);
-	int ret;
 
-	mipi_dsi_dcs_set_display_brightness_large(dsi, brightness);
-	if (ret < 0)
-		return ret;
-
-	return 0;
+	return mipi_dsi_dcs_set_display_brightness_large(dsi, brightness);
 }
 
 static const struct backlight_ops visionox_vtdr6130_bl_ops = {