diff options
author | Takashi Iwai <tiwai@suse.de> | 2014-10-27 15:15:44 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-10-27 15:17:54 +0100 |
commit | 66797f36fd17e8975f4a3449aed895cda952c0ce (patch) | |
tree | 315e11d30d969fffac8abd38fda040b90f4947a4 /sound/pci/hda/hda_codec.c | |
parent | 85c24cd8d3676cbae9e8809e894e68025c6d497e (diff) | |
download | op-kernel-dev-66797f36fd17e8975f4a3449aed895cda952c0ce.zip op-kernel-dev-66797f36fd17e8975f4a3449aed895cda952c0ce.tar.gz |
ALSA: hda - Pass printf argument directly to request_module()
request_module() handles the printf style arguments, so we don't have
to render strings in the caller side. Not only it reduces the
unnecessary temporary string buffer, it's even safer from the security
POV.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_codec.c')
-rw-r--r-- | sound/pci/hda/hda_codec.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 259fbea..0025bf4 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c @@ -966,14 +966,12 @@ find_codec_preset(struct hda_codec *codec) mutex_unlock(&preset_mutex); if (mod_requested < HDA_MODREQ_MAX_COUNT) { - char name[32]; if (!mod_requested) - snprintf(name, sizeof(name), "snd-hda-codec-id:%08x", - codec->vendor_id); + request_module("snd-hda-codec-id:%08x", + codec->vendor_id); else - snprintf(name, sizeof(name), "snd-hda-codec-id:%04x*", - (codec->vendor_id >> 16) & 0xffff); - request_module(name); + request_module("snd-hda-codec-id:%04x*", + (codec->vendor_id >> 16) & 0xffff); mod_requested++; goto again; } |