diff --git a/techpack/audio/asoc/codecs/swr-dmic.c b/techpack/audio/asoc/codecs/swr-dmic.c index 94bbede34662..fecbdb3e49cb 100644 --- a/techpack/audio/asoc/codecs/swr-dmic.c +++ b/techpack/audio/asoc/codecs/swr-dmic.c @@ -681,8 +681,7 @@ static int swr_dmic_probe(struct swr_device *pdev) ret = -ENOMEM; goto dev_err; } - strlcpy(prefix_name, swr_dmic_name_prefix_of, - strlen(swr_dmic_name_prefix_of) + 1); + strlcpy(prefix_name, swr_dmic_name_prefix_of, sizeof(prefix_name)); component->name_prefix = prefix_name; return 0;