summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorSubhransu S. Prusty <subhransu.s.prusty@intel.com>2017-11-07 13:46:24 +0300
committerMark Brown <broonie@kernel.org>2017-11-08 21:58:20 +0300
commit70e97a2d9c5266487dfec4cade28f8e587927f04 (patch)
tree4799fc0700999f05f08354636d72a7ee15fe5188 /sound
parentd956147473ec1843c2660a89ef0fba80b66c6657 (diff)
downloadlinux-70e97a2d9c5266487dfec4cade28f8e587927f04.tar.xz
ASoC: hdac_hdmi: Fix static checker warning for sprintf usage
Use snprintf instead of sprintf to shut the warning. Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com> Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com> Acked-By: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/hdac_hdmi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/soc/codecs/hdac_hdmi.c b/sound/soc/codecs/hdac_hdmi.c
index e824d47cc22b..6f3ff15c0962 100644
--- a/sound/soc/codecs/hdac_hdmi.c
+++ b/sound/soc/codecs/hdac_hdmi.c
@@ -942,7 +942,8 @@ static int hdac_hdmi_create_pin_port_muxs(struct hdac_ext_device *edev,
if (!se)
return -ENOMEM;
- sprintf(kc_name, "Pin %d port %d Input", pin->nid, port->id);
+ snprintf(kc_name, NAME_SIZE, "Pin %d port %d Input",
+ pin->nid, port->id);
kc->name = devm_kstrdup(&edev->hdac.dev, kc_name, GFP_KERNEL);
if (!kc->name)
return -ENOMEM;