summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
Diffstat (limited to 'sound')
-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 9abb3b2..d74c356 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,
new_data = krealloc(data, sizeof(*data) + sizeof(widget) * n,
GFP_KERNEL);
- if (!data)
+ if (!new_data)
return -ENOMEM;
- data->wlist.widgets[n - 1] = widget;
- data->wlist.num_widgets = n;
+ new_data->wlist.widgets[n - 1] = widget;
+ new_data->wlist.num_widgets = n;
- kcontrol->private_data = data;
+ kcontrol->private_data = new_data;
return 0;
}
OpenPOWER on IntegriCloud