MCPcopy Create free account
hub / github.com/coreboot/coreboot / __alloc_bus

Function __alloc_bus

src/device/device.c:140–152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

138 *
139 */
140static struct bus *__alloc_bus(struct device *parent)
141{
142 if (parent->downstream)
143 return parent->downstream;
144
145 struct bus *bus = calloc(1, sizeof(struct bus));
146 if (!bus)
147 die("Couldn't allocate downstream bus!\n");
148 parent->downstream = bus;
149 bus->dev = parent;
150
151 return bus;
152}
153
154struct bus *alloc_bus(struct device *parent)
155{

Callers 1

alloc_busFunction · 0.85

Calls 2

callocFunction · 0.50
dieFunction · 0.50

Tested by

no test coverage detected