audio kernel: add null point check for lpass cdc.
add null point check for lpass cdc. Change-Id: I280d4dcb5a1e28336fd1b074231b28c398808880
This commit is contained in:
@@ -1378,7 +1378,7 @@ int lpass_cdc_runtime_resume(struct device *dev)
|
|||||||
trace_printk("%s, enter\n", __func__);
|
trace_printk("%s, enter\n", __func__);
|
||||||
dev_dbg(dev,"%s, enter\n", __func__);
|
dev_dbg(dev,"%s, enter\n", __func__);
|
||||||
mutex_lock(&priv->vote_lock);
|
mutex_lock(&priv->vote_lock);
|
||||||
if (priv->lpass_core_hw_vote == NULL) {
|
if ((priv->lpass_core_hw_vote == NULL) || (priv->lpass_core_hw_vote->core == NULL)) {
|
||||||
dev_dbg(dev, "%s: Invalid lpass core hw node\n", __func__);
|
dev_dbg(dev, "%s: Invalid lpass core hw node\n", __func__);
|
||||||
goto audio_vote;
|
goto audio_vote;
|
||||||
}
|
}
|
||||||
@@ -1396,7 +1396,7 @@ int lpass_cdc_runtime_resume(struct device *dev)
|
|||||||
__func__, priv->core_hw_vote_count);
|
__func__, priv->core_hw_vote_count);
|
||||||
|
|
||||||
audio_vote:
|
audio_vote:
|
||||||
if (priv->lpass_audio_hw_vote == NULL) {
|
if ((priv->lpass_audio_hw_vote == NULL) || (priv->lpass_audio_hw_vote->core == NULL)) {
|
||||||
dev_dbg(dev, "%s: Invalid lpass audio hw node\n", __func__);
|
dev_dbg(dev, "%s: Invalid lpass audio hw node\n", __func__);
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
@@ -35,7 +35,7 @@ int digital_cdc_rsc_mgr_hw_vote_enable(struct clk *vote_handle, struct device *d
|
|||||||
ret = clk_prepare_enable(vote_handle);
|
ret = clk_prepare_enable(vote_handle);
|
||||||
mutex_unlock(&hw_vote_lock);
|
mutex_unlock(&hw_vote_lock);
|
||||||
|
|
||||||
dev_dbg(dev, "%s: return %d\n", __func__, ret);
|
dev_err(dev, "%s: return %d\n", __func__, ret);
|
||||||
trace_printk("%s: return %d\n", __func__, ret);
|
trace_printk("%s: return %d\n", __func__, ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user