ASoC: Intel: Skylake: Fix error return code in skl_probe()
authorWei Yongjun <weiyj.lk@gmail.com>
Fri, 12 Aug 2016 11:45:18 +0000 (11:45 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Oct 2016 13:23:45 +0000 (15:23 +0200)
commit 979cf59acc9d634cc140aadd0d2915947ab303cc upstream.

Fix to return error code -ENODEV from the error handling
case instead of 0, as done elsewhere in this function.

Fixes: 87b2bdf02278 ("ASoC: Intel: Skylake: Initialize NHLT table")
Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com>
Acked-By: Vinod Koul <vinod.kou@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/soc/intel/skylake/skl.c

index caa69c4598a6f14eb27c91575b49aae9fd7d3e8a..b4844f78266f7612b768743941b2bfbbf88e6d15 100644 (file)
@@ -464,8 +464,10 @@ static int skl_probe(struct pci_dev *pci,
 
        skl->nhlt = skl_nhlt_init(bus->dev);
 
-       if (skl->nhlt == NULL)
+       if (skl->nhlt == NULL) {
+               err = -ENODEV;
                goto out_free;
+       }
 
        pci_set_drvdata(skl->pci, ebus);