OSDN Git Service

ASoC: Intel: Skylake: Fix uninitialized return
authorSubhransu S. Prusty <subhransu.s.prusty@intel.com>
Wed, 23 Aug 2017 14:07:12 +0000 (19:37 +0530)
committerMark Brown <broonie@kernel.org>
Wed, 23 Aug 2017 15:50:21 +0000 (16:50 +0100)
On failure to get dsp_ops, dsp_init returns error without assigning ret. ret
is assigned in code path which will never be executed. Fix it.

Fixes: f77d443c4c29 ("ASoC: Intel: Skylake: Fix to free resources for dsp_init failure"
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/skylake/skl-messages.c

index f0f11f5..697d07b 100644 (file)
@@ -278,8 +278,8 @@ int skl_init_dsp(struct skl *skl)
 
        ops = skl_get_dsp_ops(skl->pci->device);
        if (!ops) {
-               goto unmap_mmio;
                ret = -EIO;
+               goto unmap_mmio;
        }
 
        loader_ops = ops->loader_ops();