Loading sound/soc/codecs/wm8731.c +3 −8 Original line number Diff line number Diff line Loading @@ -543,14 +543,10 @@ static int wm8731_init(struct snd_soc_device *socdev) codec->dapm_event = wm8731_dapm_event; codec->dai = &wm8731_dai; codec->num_dai = 1; codec->reg_cache_size = ARRAY_SIZE(wm8731_reg); codec->reg_cache = kzalloc(sizeof(u16) * ARRAY_SIZE(wm8731_reg), GFP_KERNEL); codec->reg_cache_size = sizeof(wm8731_reg); codec->reg_cache = kmemdup(wm8731_reg, sizeof(wm8731_reg), GFP_KERNEL); if (codec->reg_cache == NULL) return -ENOMEM; memcpy(codec->reg_cache, wm8731_reg, sizeof(u16) * ARRAY_SIZE(wm8731_reg)); codec->reg_cache_size = sizeof(u16) * ARRAY_SIZE(wm8731_reg); wm8731_reset(codec); Loading Loading @@ -627,12 +623,11 @@ static int wm8731_codec_probe(struct i2c_adapter *adap, int addr, int kind) client_template.adapter = adap; client_template.addr = addr; i2c = kzalloc(sizeof(struct i2c_client), GFP_KERNEL); i2c = kmemdup(&client_template, sizeof(client_template), GFP_KERNEL); if (i2c == NULL) { kfree(codec); return -ENOMEM; } memcpy(i2c, &client_template, sizeof(struct i2c_client)); i2c_set_clientdata(i2c, codec); codec->control_data = i2c; Loading sound/soc/codecs/wm8750.c +3 −9 Original line number Diff line number Diff line Loading @@ -807,15 +807,10 @@ static int wm8750_init(struct snd_soc_device *socdev) codec->dapm_event = wm8750_dapm_event; codec->dai = &wm8750_dai; codec->num_dai = 1; codec->reg_cache_size = ARRAY_SIZE(wm8750_reg); codec->reg_cache = kzalloc(sizeof(u16) * ARRAY_SIZE(wm8750_reg), GFP_KERNEL); codec->reg_cache_size = sizeof(wm8750_reg); codec->reg_cache = kmemdup(wm8750_reg, sizeof(wm8750_reg), GFP_KRENEL); if (codec->reg_cache == NULL) return -ENOMEM; memcpy(codec->reg_cache, wm8750_reg, sizeof(u16) * ARRAY_SIZE(wm8750_reg)); codec->reg_cache_size = sizeof(u16) * ARRAY_SIZE(wm8750_reg); wm8750_reset(codec); Loading Loading @@ -900,12 +895,11 @@ static int wm8750_codec_probe(struct i2c_adapter *adap, int addr, int kind) client_template.adapter = adap; client_template.addr = addr; i2c = kzalloc(sizeof(struct i2c_client), GFP_KERNEL); i2c = kmemdup(&client_template, sizeof(client_template), GFP_KERNEL); if (i2c == NULL) { kfree(codec); return -ENOMEM; } memcpy(i2c, &client_template, sizeof(struct i2c_client)); i2c_set_clientdata(i2c, codec); codec->control_data = i2c; Loading sound/soc/soc-dapm.c +2 −8 Original line number Diff line number Diff line Loading @@ -87,16 +87,10 @@ module_param(dapm_status, int, 0); MODULE_PARM_DESC(dapm_status, "enable DPM sysfs entries"); /* create a new dapm widget */ static struct snd_soc_dapm_widget *dapm_cnew_widget( static inline struct snd_soc_dapm_widget *dapm_cnew_widget( const struct snd_soc_dapm_widget *_widget) { struct snd_soc_dapm_widget* widget; widget = kmalloc(sizeof(struct snd_soc_dapm_widget), GFP_KERNEL); if (!widget) return NULL; memcpy(widget, _widget, sizeof(struct snd_soc_dapm_widget)); return widget; return kmemdup(_widget, sizeof(*_widget), GFP_KERNEL); } /* set up initial codec paths */ Loading Loading
sound/soc/codecs/wm8731.c +3 −8 Original line number Diff line number Diff line Loading @@ -543,14 +543,10 @@ static int wm8731_init(struct snd_soc_device *socdev) codec->dapm_event = wm8731_dapm_event; codec->dai = &wm8731_dai; codec->num_dai = 1; codec->reg_cache_size = ARRAY_SIZE(wm8731_reg); codec->reg_cache = kzalloc(sizeof(u16) * ARRAY_SIZE(wm8731_reg), GFP_KERNEL); codec->reg_cache_size = sizeof(wm8731_reg); codec->reg_cache = kmemdup(wm8731_reg, sizeof(wm8731_reg), GFP_KERNEL); if (codec->reg_cache == NULL) return -ENOMEM; memcpy(codec->reg_cache, wm8731_reg, sizeof(u16) * ARRAY_SIZE(wm8731_reg)); codec->reg_cache_size = sizeof(u16) * ARRAY_SIZE(wm8731_reg); wm8731_reset(codec); Loading Loading @@ -627,12 +623,11 @@ static int wm8731_codec_probe(struct i2c_adapter *adap, int addr, int kind) client_template.adapter = adap; client_template.addr = addr; i2c = kzalloc(sizeof(struct i2c_client), GFP_KERNEL); i2c = kmemdup(&client_template, sizeof(client_template), GFP_KERNEL); if (i2c == NULL) { kfree(codec); return -ENOMEM; } memcpy(i2c, &client_template, sizeof(struct i2c_client)); i2c_set_clientdata(i2c, codec); codec->control_data = i2c; Loading
sound/soc/codecs/wm8750.c +3 −9 Original line number Diff line number Diff line Loading @@ -807,15 +807,10 @@ static int wm8750_init(struct snd_soc_device *socdev) codec->dapm_event = wm8750_dapm_event; codec->dai = &wm8750_dai; codec->num_dai = 1; codec->reg_cache_size = ARRAY_SIZE(wm8750_reg); codec->reg_cache = kzalloc(sizeof(u16) * ARRAY_SIZE(wm8750_reg), GFP_KERNEL); codec->reg_cache_size = sizeof(wm8750_reg); codec->reg_cache = kmemdup(wm8750_reg, sizeof(wm8750_reg), GFP_KRENEL); if (codec->reg_cache == NULL) return -ENOMEM; memcpy(codec->reg_cache, wm8750_reg, sizeof(u16) * ARRAY_SIZE(wm8750_reg)); codec->reg_cache_size = sizeof(u16) * ARRAY_SIZE(wm8750_reg); wm8750_reset(codec); Loading Loading @@ -900,12 +895,11 @@ static int wm8750_codec_probe(struct i2c_adapter *adap, int addr, int kind) client_template.adapter = adap; client_template.addr = addr; i2c = kzalloc(sizeof(struct i2c_client), GFP_KERNEL); i2c = kmemdup(&client_template, sizeof(client_template), GFP_KERNEL); if (i2c == NULL) { kfree(codec); return -ENOMEM; } memcpy(i2c, &client_template, sizeof(struct i2c_client)); i2c_set_clientdata(i2c, codec); codec->control_data = i2c; Loading
sound/soc/soc-dapm.c +2 −8 Original line number Diff line number Diff line Loading @@ -87,16 +87,10 @@ module_param(dapm_status, int, 0); MODULE_PARM_DESC(dapm_status, "enable DPM sysfs entries"); /* create a new dapm widget */ static struct snd_soc_dapm_widget *dapm_cnew_widget( static inline struct snd_soc_dapm_widget *dapm_cnew_widget( const struct snd_soc_dapm_widget *_widget) { struct snd_soc_dapm_widget* widget; widget = kmalloc(sizeof(struct snd_soc_dapm_widget), GFP_KERNEL); if (!widget) return NULL; memcpy(widget, _widget, sizeof(struct snd_soc_dapm_widget)); return widget; return kmemdup(_widget, sizeof(*_widget), GFP_KERNEL); } /* set up initial codec paths */ Loading