Skip to content

Commit 7997309

Browse files
bardliaoplbossart
authored andcommitted
fixup! ASoC: SOF: ipc4-topology: Add support for SSP/DMIC DAI's
Static analyze tool reports 'ret' might be used uninitialized in this function. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
1 parent 5303a16 commit 7997309

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

sound/soc/sof/ipc4-topology.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -950,14 +950,13 @@ static int snd_sof_get_nhlt_endpoint_data(struct snd_sof_dev *sdev, struct snd_s
950950
nhlt_type = NHLT_LINK_SSP;
951951
ret = snd_sof_get_hw_config_params(sdev, dai, &sample_rate, &channel_count,
952952
&bit_depth);
953+
if (ret < 0)
954+
return ret;
953955
break;
954956
default:
955957
return 0;
956958
}
957959

958-
if (ret < 0)
959-
return ret;
960-
961960
dev_dbg(sdev->dev, "%s: dai index %d nhlt type %d direction %d\n",
962961
__func__, dai_index, nhlt_type, dir);
963962

0 commit comments

Comments
 (0)