Merge tag 'sound-fix-4.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai...
[sfrench/cifs-2.6.git] / sound / usb / mixer.c
index b1dcf6dfc27e07469de6498836358eb8a6640bcb..ca963e94ec03ca261fe271577c0568b7832c84fb 100644 (file)
@@ -2515,7 +2515,7 @@ static int parse_audio_selector_unit(struct mixer_build *state, int unitid,
                cval->control = (desc->bDescriptorSubtype == UAC2_CLOCK_SELECTOR) ?
                        UAC2_CX_CLOCK_SELECTOR : UAC2_SU_SELECTOR;
 
-       namelist = kmalloc(sizeof(char *) * desc->bNrInPins, GFP_KERNEL);
+       namelist = kmalloc_array(desc->bNrInPins, sizeof(char *), GFP_KERNEL);
        if (!namelist) {
                kfree(cval);
                return -ENOMEM;