summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/rt5663.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs/rt5663.c')
-rw-r--r--sound/soc/codecs/rt5663.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/soc/codecs/rt5663.c b/sound/soc/codecs/rt5663.c
index ee09ccd448dc..4aba6e106ee4 100644
--- a/sound/soc/codecs/rt5663.c
+++ b/sound/soc/codecs/rt5663.c
@@ -3478,6 +3478,8 @@ static int rt5663_parse_dp(struct rt5663_priv *rt5663, struct device *dev)
table_size = sizeof(struct impedance_mapping_table) *
rt5663->pdata.impedance_sensing_num;
rt5663->imp_table = devm_kzalloc(dev, table_size, GFP_KERNEL);
+ if (!rt5663->imp_table)
+ return -ENOMEM;
ret = device_property_read_u32_array(dev,
"realtek,impedance_sensing_table",
(u32 *)rt5663->imp_table, table_size);