[alsa-devel] [PATCH 1/2] ASoC: hdac_hdmi: avoid reference to invalid variable of the pin list

Vinod Koul vinod.koul at intel.com
Thu Mar 2 09:52:55 CET 2017


On Wed, Mar 01, 2017 at 10:41:23PM +0530, jeeja.kp at intel.com wrote:
> From: Jeeja KP <jeeja.kp at intel.com>
> 
> Using pin list array iterator outside the iteration of the list can
> point to dummy element, which can be invalid. So don't use pin variable
> outside the pin list iteration.
> 
> This fixes the following coccinelle warning:
> sound/soc/codecs/hdac_hdmi.c:1419:5-8: ERROR: invalid reference to the
> index variable of the iterator
> 
> Fixes: 2acd8309a3a4('ASoC: hdac_hdmi: Add support to handle MST capable pin')
> Reported-by: Julia Lawall <Julia.Lawall at lip6.fr>
> Signed-off-by: Jeeja KP <jeeja.kp at intel.com>

Both:

Acked-by: Vinod Koul <vinod.koul at intel.com>

-- 
~Vinod


More information about the Alsa-devel mailing list