diff options
author | Trent Piepho <xyzzy@speakeasy.org> | 2007-08-13 11:21:58 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-10-09 21:05:15 -0400 |
commit | b09a79f5848f2143a8ffc724910743027d5a70e0 (patch) | |
tree | d4560a5e147a40f099c51c23ee30ddaca6363453 /drivers/media/video | |
parent | c252b0511596f76a32c7c64bcc6cc60b3bc1ec3a (diff) |
V4L/DVB (6020): cx88: Fix use of uninitialized variable
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>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video')
-rw-r--r-- | drivers/media/video/cx88/cx88-core.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/media/video/cx88/cx88-core.c b/drivers/media/video/cx88/cx88-core.c index f31ec96924b9..055264b9cd61 100644 --- a/drivers/media/video/cx88/cx88-core.c +++ b/drivers/media/video/cx88/cx88-core.c | |||
@@ -1077,8 +1077,11 @@ static int get_ressources(struct cx88_core *core, struct pci_dev *pci) | |||
1077 | pci_resource_len(pci,0), | 1077 | pci_resource_len(pci,0), |
1078 | core->name)) | 1078 | core->name)) |
1079 | return 0; | 1079 | return 0; |
1080 | printk(KERN_ERR "%s: can't get MMIO memory @ 0x%llx\n", | 1080 | printk(KERN_ERR |
1081 | core->name,(unsigned long long)pci_resource_start(pci,0)); | 1081 | "%s/%d: Can't get MMIO memory @ 0x%llx, subsystem: %04x:%04x\n", |
1082 | core->name, PCI_FUNC(pci->devfn), | ||
1083 | (unsigned long long)pci_resource_start(pci, 0), | ||
1084 | pci->subsystem_vendor, pci->subsystem_device); | ||
1082 | return -EBUSY; | 1085 | return -EBUSY; |
1083 | } | 1086 | } |
1084 | 1087 | ||
@@ -1115,12 +1118,6 @@ struct cx88_core* cx88_core_get(struct pci_dev *pci) | |||
1115 | core->nr = cx88_devcount++; | 1118 | core->nr = cx88_devcount++; |
1116 | sprintf(core->name,"cx88[%d]",core->nr); | 1119 | sprintf(core->name,"cx88[%d]",core->nr); |
1117 | if (0 != get_ressources(core,pci)) { | 1120 | if (0 != get_ressources(core,pci)) { |
1118 | printk(KERN_ERR "CORE %s No more PCI ressources for " | ||
1119 | "subsystem: %04x:%04x, board: %s\n", | ||
1120 | core->name,pci->subsystem_vendor, | ||
1121 | pci->subsystem_device, | ||
1122 | cx88_boards[core->board].name); | ||
1123 | |||
1124 | cx88_devcount--; | 1121 | cx88_devcount--; |
1125 | goto fail_free; | 1122 | goto fail_free; |
1126 | } | 1123 | } |