summaryrefslogtreecommitdiff
path: root/sound/hda/common/codec.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/hda/common/codec.c')
-rw-r--r--sound/hda/common/codec.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/hda/common/codec.c b/sound/hda/common/codec.c
index c2af2511a831..81f266b9b850 100644
--- a/sound/hda/common/codec.c
+++ b/sound/hda/common/codec.c
@@ -1699,6 +1699,9 @@ int snd_hda_ctl_add(struct hda_codec *codec, hda_nid_t nid,
unsigned short flags = 0;
struct hda_nid_item *item;
+ if (!kctl)
+ return -EINVAL;
+
if (kctl->id.subdevice & HDA_SUBDEV_AMP_FLAG) {
flags |= HDA_NID_ITEM_AMP;
if (nid == 0)