diff --git a/drivers/staging/most/sound/sound.c b/drivers/staging/most/sound/sound.c index 29a4c72e6357..79ab3a78c5ec 100644 --- a/drivers/staging/most/sound/sound.c +++ b/drivers/staging/most/sound/sound.c @@ -670,7 +670,7 @@ skip_adpt_alloc: goto err_free_adpt; pcm->private_data = channel; - snprintf(pcm->name, sizeof(pcm->name), device_name); + strscpy(pcm->name, device_name, sizeof(pcm->name)); snd_pcm_set_ops(pcm, direction, &pcm_ops); if (create) {