Skip to content

Commit

Permalink
ALSA: ca0106 - Check return value of pci_enable_device() in resume
Browse files Browse the repository at this point in the history
The return value of pci_enable_device() must be checked even in resume
callback:
  sound/pci/ca0106/ca0106_main.c:1779: warning: ignoring return value of ‘pci_enable_device’, declared with attribute warn_unused_result

Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Takashi Iwai committed Dec 10, 2008
1 parent 5da9527 commit 44411e0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion sound/pci/ca0106/ca0106_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1776,7 +1776,12 @@ static int snd_ca0106_resume(struct pci_dev *pci)

pci_set_power_state(pci, PCI_D0);
pci_restore_state(pci);
pci_enable_device(pci);

if (pci_enable_device(pci) < 0) {
snd_card_disconnect(card);
return -EIO;
}

pci_set_master(pci);

ca0106_init_chip(chip);
Expand Down

0 comments on commit 44411e0

Please sign in to comment.