aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/pci/hda/hda_codec.c2
-rw-r--r--sound/pci/hda/hda_intel.c10
2 files changed, 8 insertions, 4 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index 37f24ce7c3a2..48f0cea7df14 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -1431,6 +1431,8 @@ _snd_hda_find_mixer_ctl(struct hda_codec *codec,
1431 memset(&id, 0, sizeof(id)); 1431 memset(&id, 0, sizeof(id));
1432 id.iface = SNDRV_CTL_ELEM_IFACE_MIXER; 1432 id.iface = SNDRV_CTL_ELEM_IFACE_MIXER;
1433 id.index = idx; 1433 id.index = idx;
1434 if (snd_BUG_ON(strlen(name) >= sizeof(id.name)))
1435 return NULL;
1434 strcpy(id.name, name); 1436 strcpy(id.name, name);
1435 return snd_ctl_find_id(codec->bus->card, &id); 1437 return snd_ctl_find_id(codec->bus->card, &id);
1436} 1438}
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 21a3092fad00..41db5d4da478 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -1830,7 +1830,7 @@ azx_attach_pcm_stream(struct hda_bus *bus, struct hda_codec *codec,
1830 &pcm); 1830 &pcm);
1831 if (err < 0) 1831 if (err < 0)
1832 return err; 1832 return err;
1833 strcpy(pcm->name, cpcm->name); 1833 strlcpy(pcm->name, cpcm->name, sizeof(pcm->name));
1834 apcm = kzalloc(sizeof(*apcm), GFP_KERNEL); 1834 apcm = kzalloc(sizeof(*apcm), GFP_KERNEL);
1835 if (apcm == NULL) 1835 if (apcm == NULL)
1836 return -ENOMEM; 1836 return -ENOMEM;
@@ -2358,9 +2358,11 @@ static int __devinit azx_create(struct snd_card *card, struct pci_dev *pci,
2358 } 2358 }
2359 2359
2360 strcpy(card->driver, "HDA-Intel"); 2360 strcpy(card->driver, "HDA-Intel");
2361 strcpy(card->shortname, driver_short_names[chip->driver_type]); 2361 strlcpy(card->shortname, driver_short_names[chip->driver_type],
2362 sprintf(card->longname, "%s at 0x%lx irq %i", 2362 sizeof(card->shortname));
2363 card->shortname, chip->addr, chip->irq); 2363 snprintf(card->longname, sizeof(card->longname),
2364 "%s at 0x%lx irq %i",
2365 card->shortname, chip->addr, chip->irq);
2364 2366
2365 *rchip = chip; 2367 *rchip = chip;
2366 return 0; 2368 return 0;