summaryrefslogtreecommitdiff
path: root/sound/soc/soc-dai.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/soc-dai.c')
-rw-r--r--sound/soc/soc-dai.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/soc/soc-dai.c b/sound/soc/soc-dai.c
index f231b4174b5f..a1e05307067d 100644
--- a/sound/soc/soc-dai.c
+++ b/sound/soc/soc-dai.c
@@ -177,8 +177,9 @@ u64 snd_soc_dai_get_fmt(const struct snd_soc_dai *dai, int priority)
if (max < until)
until = max;
- for (i = 0; i < until; i++)
- fmt |= ops->auto_selectable_formats[i];
+ if (ops && ops->auto_selectable_formats)
+ for (i = 0; i < until; i++)
+ fmt |= ops->auto_selectable_formats[i];
return fmt;
}