Re: [PATCH] drm/i915: Initialize 'data' in intel_dsi_dcs_backlight.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 15 Aug 2017, "Balasubramaniam, Hari Chand" <hari.chand.balasubramaniam@xxxxxxxxx> wrote:
> variable 'data'is used uninitialized in this function. thus, 'function dcs_get_backlight'
> will return unwanted value/fail.
>
> Thus, adding NULL initialized to 'data' variable will solve the return
> failure happening.

Pushed to drm-intel-next-queued, thanks for the patch.

BR,
Jani.

>
> v2: Change commit message to reflect upstream with proper message
>
> Change-Id: I3e2d3369601c119d3527efc454ea4367d7306416
> Fixes: 90198355b83c ("drm/i915/dsi: Add DCS control for Panel PWM")
> Cc: Jani Nikula <jani.nikula@xxxxxxxxx>
> Cc: Daniel Vetter <daniel.vetter@xxxxxxxxx>
> Cc: Yetunde Adebisi <yetundex.adebisi@xxxxxxxxx>
> Cc: Deepak M <m.deepak@xxxxxxxxx>
> Cc: Jani Nikula <jani.nikula@xxxxxxxxxxxxxxx>
> Signed-off-by: Balasubramaniam, Hari Chand <hari.chand.balasubramaniam@xxxxxxxxx>
> ---
>  drivers/gpu/drm/i915/intel_dsi_dcs_backlight.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_dsi_dcs_backlight.c b/drivers/gpu/drm/i915/intel_dsi_dcs_backlight.c
> index ac7c602..eec4585 100644
> --- a/drivers/gpu/drm/i915/intel_dsi_dcs_backlight.c
> +++ b/drivers/gpu/drm/i915/intel_dsi_dcs_backlight.c
> @@ -46,7 +46,7 @@ static u32 dcs_get_backlight(struct intel_connector *connector)
>  	struct intel_encoder *encoder = connector->encoder;
>  	struct intel_dsi *intel_dsi = enc_to_intel_dsi(&encoder->base);
>  	struct mipi_dsi_device *dsi_device;
> -	u8 data;
> +	u8 data = 0;
>  	enum port port;
>  
>  	/* FIXME: Need to take care of 16 bit brightness level */

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux