[PATCH 09/11] ASoC: hdac_hdmi: Fix static checker warning for sprintf usage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Subhransu S. Prusty" <subhransu.s.prusty@xxxxxxxxx>

Use snprintf instead of sprintf to shut the warning.

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@xxxxxxxxx>
Signed-off-by: Guneshwor Singh <guneshwor.o.singh@xxxxxxxxx>
---
 sound/soc/codecs/hdac_hdmi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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;
-- 
2.14.2

_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux