]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ASoC: tas2781: Replace deprecated strcpy() with strscpy()
authorHariKrishna Sagala <hariconscious@gmail.com>
Tue, 4 Nov 2025 05:42:58 +0000 (11:12 +0530)
committerMark Brown <broonie@kernel.org>
Tue, 4 Nov 2025 14:15:28 +0000 (14:15 +0000)
strcpy() is deprecated,use strscpy() instead.
No functional changes intended.
Link: https://github.com/KSPP/linux/issues/88
Signed-off-by: HariKrishna Sagala <hariconscious@gmail.com>
Link: https://patch.msgid.link/20251104054257.9953-2-hariconscious@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/tas2781-i2c.c

index d8139c9fd9e2a68792ee475bc3d23520d228e1c4..0f41951e7578c91fa0b00570d0c1b2d450dc28c1 100644 (file)
@@ -1996,7 +1996,8 @@ static void tasdevice_parse_dt(struct tasdevice_priv *tas_priv)
                dev_err(tas_priv->dev, "%s Can't get reset GPIO\n",
                        __func__);
 
-       strcpy(tas_priv->dev_name, tasdevice_id[tas_priv->chip_id].name);
+       strscpy(tas_priv->dev_name, tasdevice_id[tas_priv->chip_id].name,
+               sizeof(tas_priv->dev_name));
 }
 
 static int tasdevice_i2c_probe(struct i2c_client *i2c)