diff options
author | Trent Piepho <xyzzy@speakeasy.org> | 2007-08-13 08:21:58 -0700 |
---|---|---|
committer | Trent Piepho <xyzzy@speakeasy.org> | 2007-08-13 08:21:58 -0700 |
commit | c247df6e8ce767a60895744ee38be8425c9b62c3 (patch) | |
tree | 2a8d7f81cf4709999af7b81c70966e9320174950 /linux/drivers/media/video/cx88/cx88-core.c | |
parent | 7d73f539b514e3404c8d4210aa44aa92c0d67b43 (diff) | |
download | mediapointer-dvb-s2-c247df6e8ce767a60895744ee38be8425c9b62c3.tar.gz mediapointer-dvb-s2-c247df6e8ce767a60895744ee38be8425c9b62c3.tar.bz2 |
cx88: Fix use of uninitialized variable
From: Trent Piepho <xyzzy@speakeasy.org>
An error message for PCI resource allocation failure used the board type
before it was set. Just get rid of the error message, as get_ressources()
[sic] already prints one. Format that error message better, and add the pci
function and subsystem information to better associate the error with what
caused it.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Diffstat (limited to 'linux/drivers/media/video/cx88/cx88-core.c')
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-core.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-core.c b/linux/drivers/media/video/cx88/cx88-core.c index ba132d065..a1952fc00 100644 --- a/linux/drivers/media/video/cx88/cx88-core.c +++ b/linux/drivers/media/video/cx88/cx88-core.c @@ -1123,8 +1123,11 @@ static int get_ressources(struct cx88_core *core, struct pci_dev *pci) pci_resource_len(pci,0), core->name)) return 0; - printk(KERN_ERR "%s: can't get MMIO memory @ 0x%llx\n", - core->name,(unsigned long long)pci_resource_start(pci,0)); + printk(KERN_ERR + "%s/%d: Can't get MMIO memory @ 0x%llx, subsystem: %04x:%04x\n", + core->name, PCI_FUNC(pci->devfn), + (unsigned long long)pci_resource_start(pci, 0), + pci->subsystem_vendor, pci->subsystem_device); return -EBUSY; } @@ -1161,12 +1164,6 @@ struct cx88_core* cx88_core_get(struct pci_dev *pci) core->nr = cx88_devcount++; sprintf(core->name,"cx88[%d]",core->nr); if (0 != get_ressources(core,pci)) { - printk(KERN_ERR "CORE %s No more PCI ressources for " - "subsystem: %04x:%04x, board: %s\n", - core->name,pci->subsystem_vendor, - pci->subsystem_device, - cx88_boards[core->board].name); - cx88_devcount--; goto fail_free; } |