Skip to content

Commit 8a342b2

Browse files
crojewsk-intelbroonie
authored andcommitted
ASoC: Intel: catpt: Do not ignore errors on runtime resume
If pm_runtime_resume_and_get() fails, follow up pm_runtime_xxx() operate on device in erroneous state. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://patch.msgid.link/20251126095523.3925364-6-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 16e1773 commit 8a342b2

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

sound/soc/intel/catpt/pcm.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,7 @@ static int catpt_dai_pcm_new(struct snd_soc_pcm_runtime *rtm,
671671
return 0;
672672

673673
ret = pm_runtime_resume_and_get(cdev->dev);
674-
if (ret < 0 && ret != -EACCES)
674+
if (ret)
675675
return ret;
676676

677677
ret = catpt_ipc_set_device_format(cdev, &devfmt);
@@ -874,7 +874,7 @@ static int catpt_mixer_volume_get(struct snd_kcontrol *kcontrol,
874874
int i;
875875

876876
ret = pm_runtime_resume_and_get(cdev->dev);
877-
if (ret < 0 && ret != -EACCES)
877+
if (ret)
878878
return ret;
879879

880880
for (i = 0; i < CATPT_CHANNELS_MAX; i++) {
@@ -895,7 +895,7 @@ static int catpt_mixer_volume_put(struct snd_kcontrol *kcontrol,
895895
int ret;
896896

897897
ret = pm_runtime_resume_and_get(cdev->dev);
898-
if (ret < 0 && ret != -EACCES)
898+
if (ret)
899899
return ret;
900900

901901
ret = catpt_set_dspvol(cdev, cdev->mixer.mixer_hw_id,
@@ -926,7 +926,7 @@ static int catpt_stream_volume_get(struct snd_kcontrol *kcontrol,
926926
}
927927

928928
ret = pm_runtime_resume_and_get(cdev->dev);
929-
if (ret < 0 && ret != -EACCES)
929+
if (ret)
930930
return ret;
931931

932932
for (i = 0; i < CATPT_CHANNELS_MAX; i++) {
@@ -957,7 +957,7 @@ static int catpt_stream_volume_put(struct snd_kcontrol *kcontrol,
957957
}
958958

959959
ret = pm_runtime_resume_and_get(cdev->dev);
960-
if (ret < 0 && ret != -EACCES)
960+
if (ret)
961961
return ret;
962962

963963
ret = catpt_set_dspvol(cdev, stream->info.stream_hw_id,
@@ -1033,7 +1033,7 @@ static int catpt_loopback_switch_put(struct snd_kcontrol *kcontrol,
10331033
}
10341034

10351035
ret = pm_runtime_resume_and_get(cdev->dev);
1036-
if (ret < 0 && ret != -EACCES)
1036+
if (ret)
10371037
return ret;
10381038

10391039
ret = catpt_ipc_mute_loopback(cdev, stream->info.stream_hw_id, mute);

sound/soc/intel/catpt/sysfs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ static ssize_t fw_version_show(struct device *dev,
1616
int ret;
1717

1818
ret = pm_runtime_resume_and_get(cdev->dev);
19-
if (ret < 0 && ret != -EACCES)
19+
if (ret)
2020
return ret;
2121

2222
ret = catpt_ipc_get_fw_version(cdev, &version);

0 commit comments

Comments
 (0)