/* Returns the allocated I2O device or a negative error code if the device could not be allocated.  */
static struct i2o_device* i2o_device_alloc(void)
/* Returns the allocated I2O device or a negative error code if the device could not be allocated.  */
static struct i2o_device* i2o_device_alloc(void)
{
	struct i2o_device *dev;
	dev = kzalloc(sizeof(*dev), GFP_KERNEL);
	if (!dev)
		return ERR_PTR(-ENOMEM);
	INIT_LIST_HEAD(&dev->list);
	mutex_init(&dev->lock);
	dev->device.bus = &i2o_bus_type;
	dev->device.release = &i2o_device_release;
	return dev;
}