On Sun, May 05, 2013 at 01:01:28PM +0200, Maxime Villard wrote:
> I have been making a code scanner for a while, and I wanted to test
> a new rule, so I scanned sys/pci/drm. It found an uninitialized
> variable in intel_ddi.c.
> 
> Quite simple, if !(val & DDI_BUF_CTL_ENABLE) at l.1420, the variable
> 'wait' is not initialized at l.1432.
> 
> I guess I should send it upstream, but, you know, I don't want to
> subscribe to the ML only to send one small mail. Is there someone here
> who's upstream or who's willing to send that patch?

It seems later upstream versions already have this change:

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/drivers/gpu/drm/i915/intel_ddi.c?id=f3e227df8235fc0bf8ba08304aa135066ec9b9b0

I'll commit that one with the line move shortly.

> 
> Thanks
> 
> 
> Index: intel_ddi.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/pci/drm/i915/intel_ddi.c,v
> retrieving revision 1.1
> diff -u -r1.1 intel_ddi.c
> --- intel_ddi.c       18 Mar 2013 12:36:52 -0000      1.1
> +++ intel_ddi.c       5 May 2013 10:56:40 -0000
> @@ -1412,7 +1412,7 @@
>       struct intel_dp *intel_dp = &intel_dig_port->dp;
>       struct inteldrm_softc *dev_priv = encoder->dev->dev_private;
>       enum port port = intel_dig_port->port;
> -     bool wait;
> +     bool wait = false;
>       uint32_t val;
>  
>       if (I915_READ(DP_TP_CTL(port)) & DP_TP_CTL_ENABLE) {

Reply via email to