On Wed, Dec 12, 2018 at 01:15:28PM +0100, Christian Gromm wrote:
> @@ -587,7 +587,7 @@ static int audio_probe_channel(struct most_interface 
> *iface, int channel_id,
>       int capture_count = 0;
>       int ret;
>       int direction;
> -     char *card_name;
> +     char *device_name;
        ^^^^^^^^^^^^^^^^^

>       u16 ch_num;
>       u8 create = 0;
>       char *sample_res;
> @@ -600,7 +600,7 @@ static int audio_probe_channel(struct most_interface 
> *iface, int channel_id,
>               return -EINVAL;
>       }
>  
> -     ret = split_arg_list(arg_list, &card_name, &ch_num, &sample_res,
> +     ret = split_arg_list(arg_list, &device_name, &ch_num, &sample_res,
>                            &create);
>       if (ret < 0)
>               return ret;
> @@ -622,7 +622,7 @@ static int audio_probe_channel(struct most_interface 
> *iface, int channel_id,
>       adpt->pcm_dev_idx = 0;
>       INIT_LIST_HEAD(&adpt->dev_list);
>       iface->priv = adpt;
> -     ret = snd_card_new(&iface->dev, -1, card_name, THIS_MODULE,
> +     ret = snd_card_new(&iface->dev, -1, device_name, THIS_MODULE,
>                          sizeof(*channel), &adpt->card);
>       if (ret < 0)
>               return ret;
> @@ -663,14 +663,14 @@ static int audio_probe_channel(struct most_interface 
> *iface, int channel_id,
>       if (ret)
>               goto err_free_adpt;
>  
> -     ret = snd_pcm_new(adpt->card, card_name, adpt->pcm_dev_idx,
> +     ret = snd_pcm_new(adpt->card, device_name, adpt->pcm_dev_idx,
>                         playback_count, capture_count, &pcm);
>  
>       if (ret < 0)
>               goto err_free_adpt;
>  
>       pcm->private_data = channel;
> -
> +     snprintf(pcm->name, sizeof(device_name), device_name);
                            ^^^^^^^^^^^^^^^^^^^

This change was not described in the commit message and it's not
correct.  sizeof(device_name) is sizeof(long).  We should be taking
sizeof(pcm->name) which is 80. 

>       snd_pcm_set_ops(pcm, direction, &pcm_ops);
>  
>       if (create) {

regards,
dan carpenter
_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to