aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/soc/soc-dapm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 9abb3b21f1fd..d74c3560d556 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -225,13 +225,13 @@ static int dapm_kcontrol_add_widget(struct snd_kcontrol *kcontrol,
225 225
226 new_data = krealloc(data, sizeof(*data) + sizeof(widget) * n, 226 new_data = krealloc(data, sizeof(*data) + sizeof(widget) * n,
227 GFP_KERNEL); 227 GFP_KERNEL);
228 if (!data) 228 if (!new_data)
229 return -ENOMEM; 229 return -ENOMEM;
230 230
231 data->wlist.widgets[n - 1] = widget; 231 new_data->wlist.widgets[n - 1] = widget;
232 data->wlist.num_widgets = n; 232 new_data->wlist.num_widgets = n;
233 233
234 kcontrol->private_data = data; 234 kcontrol->private_data = new_data;
235 235
236 return 0; 236 return 0;
237} 237}