Skip to content

Commit

Permalink
ASoC: SOF: Fix unused variable warnings
Browse files Browse the repository at this point in the history
The recent fix for the build fix caused a couple of unused variable
compiler warnings when CONFIG_SND_SOC_SOF_NOCODEC isn't set:
  sound/soc/sof/core.c:263:6: warning: unused variable ‘ret’ [-Wunused-variable]
  sound/soc/sof/core.c:262:28: warning: unused variable ‘machine’ [-Wunused-variable]

Fix them by adding another ifdef.

Fixes: ce38a75 ("ASoC: SOF: core: fix undefined nocodec reference")
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Takashi Iwai authored and Mark Brown committed May 9, 2019
1 parent 4fc19ff commit 7f6647c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sound/soc/sof/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,10 @@ int snd_sof_create_page_table(struct snd_sof_dev *sdev,
static int sof_machine_check(struct snd_sof_dev *sdev)
{
struct snd_sof_pdata *plat_data = sdev->pdata;
#if IS_ENABLED(CONFIG_SND_SOC_SOF_NOCODEC)
struct snd_soc_acpi_mach *machine;
int ret;
#endif

if (plat_data->machine)
return 0;
Expand Down

0 comments on commit 7f6647c

Please sign in to comment.