]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: Intel: Skylake: Re-order some code to silence a warning
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 8 Dec 2017 11:54:25 +0000 (14:54 +0300)
committerMark Brown <broonie@kernel.org>
Mon, 11 Dec 2017 11:43:15 +0000 (11:43 +0000)
commit5ba82275419ad1c6622c03fd61822e3d70f3d7f5
tree26ad02718d44718aac966527aca866cbd2ad092a
parentf8562b185d992a8473c17071f4b4db282f62cb68
ASoC: Intel: Skylake: Re-order some code to silence a warning

I get a Smatch warning here:

    sound/soc/intel/skylake/skl-nhlt.c:335 skl_get_ssp_clks()
    error: testing array offset 'j' after use.

The code is harmless, but the checker is right that we should swap these
two conditions so we verify that the offset is within bounds before we
use it.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Sriram Periyasamy <sriramx.periyasamy@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/skylake/skl-nhlt.c