diff options
-rw-r--r-- | sound/soc/generic/simple-card-utils.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sound/soc/generic/simple-card-utils.c b/sound/soc/generic/simple-card-utils.c index 6a31d07976b9..17d8aee43835 100644 --- a/sound/soc/generic/simple-card-utils.c +++ b/sound/soc/generic/simple-card-utils.c @@ -280,7 +280,10 @@ static int asoc_simple_card_get_dai_id(struct device_node *ep) * Non HDMI sound case, counting port/endpoint on its DT * is enough. Let's count it. */ - of_graph_parse_endpoint(ep, &info); + ret = of_graph_parse_endpoint(ep, &info); + if (ret) + return -ENXIO; + return info.port; } |