diff options
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r-- | sound/soc/soc-core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index b3605a1c8c46..b2c327b14b00 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c | |||
@@ -3183,7 +3183,7 @@ static inline char *fmt_single_name(struct device *dev, int *id) | |||
3183 | if (dev_name(dev) == NULL) | 3183 | if (dev_name(dev) == NULL) |
3184 | return NULL; | 3184 | return NULL; |
3185 | 3185 | ||
3186 | strncpy(name, dev_name(dev), NAME_SIZE); | 3186 | strlcpy(name, dev_name(dev), NAME_SIZE); |
3187 | 3187 | ||
3188 | /* are we a "%s.%d" name (platform and SPI components) */ | 3188 | /* are we a "%s.%d" name (platform and SPI components) */ |
3189 | found = strstr(name, dev->driver->name); | 3189 | found = strstr(name, dev->driver->name); |
@@ -3206,7 +3206,7 @@ static inline char *fmt_single_name(struct device *dev, int *id) | |||
3206 | 3206 | ||
3207 | /* sanitize component name for DAI link creation */ | 3207 | /* sanitize component name for DAI link creation */ |
3208 | snprintf(tmp, NAME_SIZE, "%s.%s", dev->driver->name, name); | 3208 | snprintf(tmp, NAME_SIZE, "%s.%s", dev->driver->name, name); |
3209 | strncpy(name, tmp, NAME_SIZE); | 3209 | strlcpy(name, tmp, NAME_SIZE); |
3210 | } else | 3210 | } else |
3211 | *id = 0; | 3211 | *id = 0; |
3212 | } | 3212 | } |