aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSubhransu S. Prusty <[email protected]>2017-11-07 16:16:24 +0530
committerMark Brown <[email protected]>2017-11-08 18:58:20 +0000
commit70e97a2d9c5266487dfec4cade28f8e587927f04 (patch)
tree4799fc0700999f05f08354636d72a7ee15fe5188
parentd956147473ec1843c2660a89ef0fba80b66c6657 (diff)
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 <[email protected]> Signed-off-by: Guneshwor Singh <[email protected]> Acked-By: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
-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;