diff options
author | Antonino A. Daplas <adaplas@gmail.com> | 2006-10-03 01:14:53 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-03 08:04:11 -0700 |
commit | 7b566b1f7bdbbcfa8d11b8018c6dec5467f7c62b (patch) | |
tree | d0bd3fb31be0426199f2024354cc042e0b18bfeb /drivers | |
parent | b0b10324b85d0379a2eec4984e77b25299a97ed4 (diff) | |
download | linux-7b566b1f7bdbbcfa8d11b8018c6dec5467f7c62b.tar.bz2 |
[PATCH] nvidiafb: Honor the return value of pci_enable_device
Check the return value of pci_enable_device().
Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/video/nvidia/nvidia.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/video/nvidia/nvidia.c b/drivers/video/nvidia/nvidia.c index f8cd4c519aeb..731edf7cb0a0 100644 --- a/drivers/video/nvidia/nvidia.c +++ b/drivers/video/nvidia/nvidia.c @@ -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); } @@ -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; } |