This is an automated email from the ASF dual-hosted git repository. raiden00 pushed a commit to branch releases/12.7 in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit fb97285a3629a3e73a50641a13cb6c0ccb43a80b Author: Bowen Wang <[email protected]> AuthorDate: Fri Mar 1 11:25:54 2024 +0800 drivers/pci: one pci device should only associate with one driver Signed-off-by: Bowen Wang <[email protected]> --- drivers/pci/pci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index e5f252d40b..8095d6530b 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -1941,12 +1941,13 @@ int pci_register_device(FAR struct pci_device_s *dev) if (drv->probe(dev) >= 0) { dev->drv = drv; - break; + goto out; } } } } +out: nxmutex_unlock(&g_pci_lock); return ret; }
