/* Returns 0 on success or negative error code on failure.  */
int __init i2o_driver_init(void)
/* Returns 0 on success or negative error code on failure.  */
int __init i2o_driver_init(void)
{
	int rc = 0;
	spin_lock_init(&i2o_drivers_lock);
	if ((i2o_max_drivers < 2) || (i2o_max_drivers > 64)) {
		osm_warn("max_drivers set to %d, but must be >=2 and <= 64\n",
			 i2o_max_drivers);
		i2o_max_drivers = I2O_MAX_DRIVERS;
	}
	osm_info("max drivers = %d\n", i2o_max_drivers);
	i2o_drivers =
	    kcalloc(i2o_max_drivers, sizeof(*i2o_drivers), GFP_KERNEL);
	if (!i2o_drivers)
		return -ENOMEM;
	rc = bus_register(&i2o_bus_type);
	if (rc < 0)
		kfree(i2o_drivers);
	return rc;
}