if (extra_size < 0)
extra_size = 0;
- card = (snd_card_t *) snd_kcalloc(sizeof(snd_card_t) + extra_size, GFP_KERNEL);
+ card = kcalloc(1, sizeof(*card) + extra_size, GFP_KERNEL);
if (card == NULL)
return NULL;
if (xid) {
return 0;
if (card->power_state == SNDRV_CTL_POWER_D0)
return 0;
+ /* restore the PCI config space */
+ pci_restore_state(dev, dev->saved_config_space);
/* FIXME: correct state value? */
return card->pm_resume(card, 0);
}