diff options
author | Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> | 2020-08-13 12:58:36 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-08-17 15:42:57 +0100 |
commit | 2e3e0bc378f205370fc4c6dbd9374d66e803ce53 (patch) | |
tree | 3b3d10ead46e894e237422d46f8835f0e8cb489e /sound/soc/sof/intel | |
parent | 11ec0edc6408a739dffca34ebbbe921817c3b10e (diff) |
ASoC: SOF: Intel: hda-codec: move variable used conditionally
Cppcheck reports the following warning:
sound/soc/sof/intel/hda-codec.c:122:20: style: Unused variable: codec
[unusedVariable]
struct hda_codec *codec;
^
Move declaration inside a conditionally-compiled block.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200813175839.59422-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof/intel')
-rw-r--r-- | sound/soc/sof/intel/hda-codec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/sof/intel/hda-codec.c b/sound/soc/sof/intel/hda-codec.c index 119aa9ffcc66..55811b99e47a 100644 --- a/sound/soc/sof/intel/hda-codec.c +++ b/sound/soc/sof/intel/hda-codec.c @@ -116,10 +116,10 @@ static int hda_codec_probe(struct snd_sof_dev *sdev, int address, { #if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC) struct hdac_hda_priv *hda_priv; + struct hda_codec *codec; #endif struct hda_bus *hbus = sof_to_hbus(sdev); struct hdac_device *hdev; - struct hda_codec *codec; u32 hda_cmd = (address << 28) | (AC_NODE_ROOT << 20) | (AC_VERB_PARAMETERS << 8) | AC_PAR_VENDOR_ID; u32 resp = -1; |