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>
This commit is contained in:
Subhransu S. Prusty 2017-11-07 16:16:24 +05:30 committed by Mark Brown
parent d956147473
commit 70e97a2d9c
No known key found for this signature in database
GPG key ID: 24D68B725D5487D0

View file

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