summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/cpcap.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs/cpcap.c')
-rw-r--r--sound/soc/codecs/cpcap.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/soc/codecs/cpcap.c b/sound/soc/codecs/cpcap.c
index 598e09024e23..ffdf8b615efa 100644
--- a/sound/soc/codecs/cpcap.c
+++ b/sound/soc/codecs/cpcap.c
@@ -1667,6 +1667,8 @@ static int cpcap_codec_probe(struct platform_device *pdev)
{
struct device_node *codec_node =
of_get_child_by_name(pdev->dev.parent->of_node, "audio-codec");
+ if (!codec_node)
+ return -ENODEV;
pdev->dev.of_node = codec_node;