asoc: codec: add error handle for swr_dmic port params

handle errors if "qcom,swr-tx-port-params" is not parsed correctly.

Change-Id: I9fb79cfabd9b881c43150072e714c1559160e03d
This commit is contained in:
Junkai Cai
2021-03-15 12:13:58 -07:00
parent 01b6734297
commit 2f7a802e67

View File

@@ -625,7 +625,14 @@ static int swr_dmic_probe(struct swr_device *pdev)
pdev->dev.of_node->full_name);
goto dev_err;
}
swr_dmic_parse_port_params(&pdev->dev, "qcom,swr-tx-port-params");
ret = swr_dmic_parse_port_params(&pdev->dev, "qcom,swr-tx-port-params");
if (ret) {
dev_err(&pdev->dev, "%s: Parsing %s failed in node %s\n",
__func__, "qcom,swr-tx-port-params",
pdev->dev.of_node->full_name);
goto dev_err;
}
/*
* Add 5msec delay to provide sufficient time for