]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - sound/soc/codecs/wm8904.c
treewide: kmalloc() -> kmalloc_array()
[linux.git] / sound / soc / codecs / wm8904.c
index 20fdcae06c6b1db24bd7d86036b61c7c4c27ef2b..9037a35b931dbc7a6c07173439d456f81b3bba76 100644 (file)
@@ -596,7 +596,7 @@ static const struct snd_kcontrol_new wm8904_adc_snd_controls[] = {
 SOC_DOUBLE_R_TLV("Digital Capture Volume", WM8904_ADC_DIGITAL_VOLUME_LEFT,
                 WM8904_ADC_DIGITAL_VOLUME_RIGHT, 1, 119, 0, digital_tlv),
 
-SOC_ENUM("Left Caputure Mode", lin_mode),
+SOC_ENUM("Left Capture Mode", lin_mode),
 SOC_ENUM("Right Capture Mode", rin_mode),
 
 /* No TLV since it depends on mode */
@@ -2023,8 +2023,9 @@ static void wm8904_handle_pdata(struct snd_soc_component *component)
                                     wm8904_get_drc_enum, wm8904_put_drc_enum);
 
                /* We need an array of texts for the enum API */
-               wm8904->drc_texts = kmalloc(sizeof(char *)
-                                           * pdata->num_drc_cfgs, GFP_KERNEL);
+               wm8904->drc_texts = kmalloc_array(pdata->num_drc_cfgs,
+                                                 sizeof(char *),
+                                                 GFP_KERNEL);
                if (!wm8904->drc_texts)
                        return;