PCI: make pci_restore_state return void
pci_restore_state only ever returns 0, thus there is no benefit in having it return any value. Also, a large majority of the callers do not check the return code of pci_restore_state. Make the pci_restore_state a void return and avoid the overhead. Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Jon Mason <jon.mason@exar.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
这个提交包含在:
@@ -90,12 +90,7 @@ int snd_cs5535audio_resume(struct pci_dev *pci)
|
||||
int i;
|
||||
|
||||
pci_set_power_state(pci, PCI_D0);
|
||||
if (pci_restore_state(pci) < 0) {
|
||||
printk(KERN_ERR "cs5535audio: pci_restore_state failed, "
|
||||
"disabling device\n");
|
||||
snd_card_disconnect(card);
|
||||
return -EIO;
|
||||
}
|
||||
pci_restore_state(pci);
|
||||
if (pci_enable_device(pci) < 0) {
|
||||
printk(KERN_ERR "cs5535audio: pci_enable_device failed, "
|
||||
"disabling device\n");
|
||||
|
在新工单中引用
屏蔽一个用户