mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 03:40:35 +09:00
audio: coveriy fix [1/1]
PD#SWPL-14015 Problem: Coverity defect cleanup. Solution: Coverity defect cleanup. Verify: SM1 Change-Id: I5d564ddafb4105b80c0243efafa6fe141fd59be7 Signed-off-by: Shuai Li <shuai.li@amlogic.com>
This commit is contained in:
@@ -1694,11 +1694,11 @@ static int aml_tdm_platform_suspend(struct platform_device *pdev,
|
||||
|
||||
/*mute default clk */
|
||||
if (p_tdm->start_clk_enable == 1 && p_tdm->pin_ctl) {
|
||||
struct pinctrl_state *state = NULL;
|
||||
struct pinctrl_state *ps = NULL;
|
||||
|
||||
state = pinctrl_lookup_state(p_tdm->pin_ctl, "tdmout_a_gpio");
|
||||
if (!IS_ERR_OR_NULL(state)) {
|
||||
pinctrl_select_state(p_tdm->pin_ctl, state);
|
||||
ps = pinctrl_lookup_state(p_tdm->pin_ctl, "tdmout_a_gpio");
|
||||
if (!IS_ERR_OR_NULL(ps)) {
|
||||
pinctrl_select_state(p_tdm->pin_ctl, ps);
|
||||
pr_info("%s tdm pins disable!\n", __func__);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -242,7 +242,9 @@ static int aml_pcm_timer_create(struct snd_pcm_substream *substream)
|
||||
prtd->timer_period = 1;
|
||||
prtd->timer.data = (unsigned long)substream;
|
||||
prtd->timer.function = aml_pcm_timer_callback;
|
||||
spin_lock(&prtd->lock);
|
||||
prtd->running = 0;
|
||||
spin_unlock(&prtd->lock);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -145,12 +145,17 @@ static int aml_pcm_dai_trigger(struct snd_pcm_substream *substream, int cmd,
|
||||
{
|
||||
struct aml_pcm *pcm_p = dev_get_drvdata(dai->dev);
|
||||
|
||||
if (!pcm_p) {
|
||||
pr_err("%s(), null ptr\n", __func__);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
switch (cmd) {
|
||||
case SNDRV_PCM_TRIGGER_START:
|
||||
case SNDRV_PCM_TRIGGER_RESUME:
|
||||
case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
|
||||
/* TODO */
|
||||
if (pcm_p && pcm_p->pcm_mode) {
|
||||
if (pcm_p->pcm_mode) {
|
||||
pr_info("aiu pcm master stream %d enable\n\n",
|
||||
substream->stream);
|
||||
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
|
||||
@@ -169,7 +174,7 @@ static int aml_pcm_dai_trigger(struct snd_pcm_substream *substream, int cmd,
|
||||
case SNDRV_PCM_TRIGGER_STOP:
|
||||
case SNDRV_PCM_TRIGGER_SUSPEND:
|
||||
case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
|
||||
if (pcm_p && pcm_p->pcm_mode) {
|
||||
if (pcm_p->pcm_mode) {
|
||||
pr_info("aiu master pcm stream %d disable\n\n",
|
||||
substream->stream);
|
||||
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
|
||||
|
||||
Reference in New Issue
Block a user