Skip to content

Commit

Permalink
[PATCH] nvidiafb: Honor the return value of pci_enable_device
Browse files Browse the repository at this point in the history
Check the return value of pci_enable_device().

Signed-off-by: Antonino Daplas <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
adaplas authored and Linus Torvalds committed Oct 3, 2006
1 parent b0b1032 commit 7b566b1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/video/nvidia/nvidia.c
Original file line number Diff line number Diff line change
Expand Up @@ -984,7 +984,10 @@ static int nvidiafb_resume(struct pci_dev *dev)

if (par->pm_state != PM_EVENT_FREEZE) {
pci_restore_state(dev);
pci_enable_device(dev);

if (pci_enable_device(dev))
goto fail;

pci_set_master(dev);
}

Expand All @@ -993,6 +996,7 @@ static int nvidiafb_resume(struct pci_dev *dev)
fb_set_suspend (info, 0);
nvidiafb_blank(FB_BLANK_UNBLANK, info);

fail:
release_console_sem();
return 0;
}
Expand Down

0 comments on commit 7b566b1

Please sign in to comment.