aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/isa/es1688/es1688.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/sound/isa/es1688/es1688.c b/sound/isa/es1688/es1688.c
index fdcce311f80a..0cde8131a575 100644
--- a/sound/isa/es1688/es1688.c
+++ b/sound/isa/es1688/es1688.c
@@ -149,10 +149,11 @@ static int __devinit snd_es1688_probe(struct snd_card *card, unsigned int n)
149 if (error < 0) 149 if (error < 0)
150 return error; 150 return error;
151 151
152 strcpy(card->driver, "ES1688"); 152 strlcpy(card->driver, "ES1688", sizeof(card->driver));
153 strcpy(card->shortname, pcm->name); 153 strlcpy(card->shortname, pcm->name, sizeof(card->shortname));
154 sprintf(card->longname, "%s at 0x%lx, irq %i, dma %i", pcm->name, 154 snprintf(card->longname, sizeof(card->longname),
155 chip->port, chip->irq, chip->dma8); 155 "%s at 0x%lx, irq %i, dma %i", pcm->name, chip->port,
156 chip->irq, chip->dma8);
156 157
157 if (fm_port[n] == SNDRV_AUTO_PORT) 158 if (fm_port[n] == SNDRV_AUTO_PORT)
158 fm_port[n] = port[n]; /* share the same port */ 159 fm_port[n] = port[n]; /* share the same port */
@@ -271,6 +272,8 @@ static int __devinit snd_es968_pnp_detect(struct pnp_card_link *pcard,
271 if (enable[dev] && isapnp[dev]) 272 if (enable[dev] && isapnp[dev])
272 break; 273 break;
273 } 274 }
275 if (dev == SNDRV_CARDS)
276 return -ENODEV;
274 277
275 error = snd_card_create(index[dev], id[dev], THIS_MODULE, 278 error = snd_card_create(index[dev], id[dev], THIS_MODULE,
276 sizeof(struct snd_es1688), &card); 279 sizeof(struct snd_es1688), &card);