[Intel-gfx] [PATCH] drm/i915: Initialize 'data' in intel_dsi_dcs_backlight.c
Jani Nikula
jani.nikula at intel.com
Tue Aug 15 08:07:35 UTC 2017
On Tue, 15 Aug 2017, "Balasubramaniam, Hari Chand" <hari.chand.balasubramaniam at intel.com> 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 at intel.com>
> Cc: Daniel Vetter <daniel.vetter at intel.com>
> Cc: Yetunde Adebisi <yetundex.adebisi at intel.com>
> Cc: Deepak M <m.deepak at intel.com>
> Cc: Jani Nikula <jani.nikula at linux.intel.com>
> Signed-off-by: Balasubramaniam, Hari Chand <hari.chand.balasubramaniam at intel.com>
> ---
> 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
More information about the Intel-gfx
mailing list