diff mbox

[-next] ASoC: Intel: Skylake: Fix error return code in skl_probe()

Message ID 1471002318-20209-1-git-send-email-weiyj.lk@gmail.com (mailing list archive)
State Accepted
Commit 979cf59acc9d634cc140aadd0d2915947ab303cc
Headers show

Commit Message

Wei Yongjun Aug. 12, 2016, 11:45 a.m. UTC
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>
---
 sound/soc/intel/skylake/skl.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Vinod Koul Aug. 12, 2016, 12:11 p.m. UTC | #1
On Fri, Aug 12, 2016 at 11:45:18AM +0000, Wei Yongjun wrote:
> Fix to return error code -ENODEV from the error handling
> case instead of 0, as done elsewhere in this function.

Acked-By: Vinod Koul <vinod.kou@intel.com>
diff mbox

Patch

diff --git a/sound/soc/intel/skylake/skl.c b/sound/soc/intel/skylake/skl.c
index a893ca1..2989c16 100644
--- a/sound/soc/intel/skylake/skl.c
+++ b/sound/soc/intel/skylake/skl.c
@@ -672,8 +672,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;
+	}
 
 	skl_nhlt_update_topology_bin(skl);