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)
commit87684d338a22d15e47b16ee68f569d74ad1d076e
tree26ad02718d44718aac966527aca866cbd2ad092a
parent9452314d92d600e8702533b10f10ec440aad5db9
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