Skip to contentSkip to conversation

ALSA: intel8x0: Check pci_iomap() success for DEVICE_ALI

PATCH Applied Scott Wood 2 participants 2 messages Apr 15, 2015 – Apr 16, 2015 Sound

lore
Share & tools
lore

Scott Wood

author
#0 lore raw

PATCH 1/1 ALSA: intel8x0: Check pci_iomap() success for DEVICE_ALI

DEVICE_ALI previously would jump to port_inited after calling pci_iomap(), bypassing the check for bmaddr being NULL.

---
 sound/pci/intel8x0.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
sound/pci/intel8x0.c +2 -2
index 2c5484e..dfb77a5 100644
@@ -3101,13 +3101,13 @@ static int snd_intel8x0_create(struct snd_card *card,
 		chip->bmaddr = pci_iomap(pci, 3, 0);
 	else
 		chip->bmaddr = pci_iomap(pci, 1, 0);
+
+ port_inited:
 	if (!chip->bmaddr) {
 		dev_err(card->dev, "Controller space ioremap problem\n");
 		snd_intel8x0_free(chip);
 		return -EIO;
 	}
-
- port_inited:
 	chip->bdbars_count = bdbars[device_type];
 
 	/* initialize offsets */
Signature · 1 line
2.1.0
Applied
#1 lore raw

At Wed, 15 Apr 2015 18:16:47 -0500,

Quoted 5 lines · Scott Wood

DEVICE_ALI previously would jump to port_inited after calling pci_iomap(), bypassing the check for bmaddr being NULL.

Applied, thanks.

Takashi

Quoted 27 lines
---
 sound/pci/intel8x0.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
sound/pci/intel8x0.c +2 -2
index 2c5484e..dfb77a5 100644
@@ -3101,13 +3101,13 @@ static int snd_intel8x0_create(struct snd_card *card,
 		chip->bmaddr = pci_iomap(pci, 3, 0);
 	else
 		chip->bmaddr = pci_iomap(pci, 1, 0);
+
+ port_inited:
 	if (!chip->bmaddr) {
 		dev_err(card->dev, "Controller space ioremap problem\n");
 		snd_intel8x0_free(chip);
 		return -EIO;
 	}
-
- port_inited:
 	chip->bdbars_count = bdbars[device_type];
 
 	/* initialize offsets */
Signature · 1 line
2.1.0