ASoC: Intel: Skylake: Fix return for pm_runtime_get_sync()
authorJeeja KP <jeeja.kp@intel.com>
Thu, 22 Oct 2015 17:52:34 +0000 (23:22 +0530)
committerMark Brown <broonie@kernel.org>
Fri, 23 Oct 2015 16:31:34 +0000 (01:31 +0900)
pm_runtime_get_sync() will return a negative value in case of
error and can return postive value for success.  The return check
for pm_runtime_get_sync() must be less than 0, so fix it

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/skylake/skl-pcm.c

index a8f53da11ae3c3bf2dd316233b184c66dea14227..a2f94ce1679d0db2c23b3ccb0d0339afb46473cf 100644 (file)
@@ -116,7 +116,7 @@ static int skl_pcm_open(struct snd_pcm_substream *substream,
 
        dev_dbg(dai->dev, "%s: %s\n", __func__, dai->name);
        ret = pm_runtime_get_sync(dai->dev);
-       if (ret)
+       if (ret < 0)
                return ret;
 
        stream = snd_hdac_ext_stream_assign(ebus, substream,