Skip to content

Commit e706805

Browse files
CV-Bowenxiaoxiang781216
authored andcommitted
drivers/pci: one pci device should only associate with one driver
Signed-off-by: Bowen Wang <[email protected]>
1 parent d6f4d0a commit e706805

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/pci/pci.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2011,12 +2011,13 @@ int pci_register_device(FAR struct pci_device_s *dev)
20112011
if (drv->probe(dev) >= 0)
20122012
{
20132013
dev->drv = drv;
2014-
break;
2014+
goto out;
20152015
}
20162016
}
20172017
}
20182018
}
20192019

2020+
out:
20202021
nxmutex_unlock(&g_pci_lock);
20212022
return ret;
20222023
}

0 commit comments

Comments
 (0)