aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/soc/codecs/wm9712.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sound/soc/codecs/wm9712.c b/sound/soc/codecs/wm9712.c
index ee7a691a9ba1..264413a00cac 100644
--- a/sound/soc/codecs/wm9712.c
+++ b/sound/soc/codecs/wm9712.c
@@ -676,14 +676,13 @@ static int wm9712_soc_probe(struct platform_device *pdev)
676 codec = socdev->codec; 676 codec = socdev->codec;
677 mutex_init(&codec->mutex); 677 mutex_init(&codec->mutex);
678 678
679 codec->reg_cache = 679 codec->reg_cache = kmemdup(wm9712_reg, sizeof(wm9712_reg), GFP_KERNEL);
680 kzalloc(sizeof(u16) * ARRAY_SIZE(wm9712_reg), GFP_KERNEL); 680
681 if (codec->reg_cache == NULL) { 681 if (codec->reg_cache == NULL) {
682 ret = -ENOMEM; 682 ret = -ENOMEM;
683 goto cache_err; 683 goto cache_err;
684 } 684 }
685 memcpy(codec->reg_cache, wm9712_reg, sizeof(u16) * ARRAY_SIZE(wm9712_reg)); 685 codec->reg_cache_size = sizeof(wm9712_reg);
686 codec->reg_cache_size = sizeof(u16) * ARRAY_SIZE(wm9712_reg);
687 codec->reg_cache_step = 2; 686 codec->reg_cache_step = 2;
688 687
689 codec->name = "WM9712"; 688 codec->name = "WM9712";