pci: fix wrong warning about multiple usage

Issue #1487
This commit is contained in:
Alexander Boettcher 2015-05-12 15:35:19 +02:00 committed by Christian Helmuth
parent ccc0f4c2ec
commit 8fa802815d
1 changed files with 3 additions and 2 deletions

View File

@ -503,6 +503,9 @@ namespace Pci {
* device and return its capability.
*/
try {
Device_component * dev = new (_device_slab) Device_component(config, config_space, _ep, this,
!Genode::strcmp(_label.string(), "acpi_drv"));
/* if more than one driver uses the device - warn about */
if (bdf_in_use.get(Device_config::MAX_BUSES * bus +
Device_config::MAX_DEVICES * device +
@ -515,8 +518,6 @@ namespace Pci {
Device_config::MAX_DEVICES * device +
function, 1);
Device_component * dev = new (_device_slab) Device_component(config, config_space, _ep, this,
!Genode::strcmp(_label.string(), "acpi_drv"));
_device_list.insert(dev);
return _ep->manage(dev);
} catch (Genode::Allocator::Out_of_memory) {