ERROR0: 
exit_release: 
static int via686a_detect(struct i2c_adapter *adapter, int address, int kind){	struct i2c_client *new_client;	struct via686a_data *data;	int err = 0;	const char client_name[] = "via686a";	u16 val;	/* Make sure we are probing the ISA bus!!  */	if (!i2c_is_isa_adapter(adapter)) {		dev_err(&adapter->dev,		"via686a_detect called for an I2C bus adapter?!?\n");		return 0;	}	/* 8231 requires multiple of 256, we enforce that on 686 as well */	if (force_addr)		address = force_addr & 0xFF00;	if (force_addr) {		dev_warn(&adapter->dev, "forcing ISA address 0x%04X\n",			 address);		if (PCIBIOS_SUCCESSFUL !=		    pci_write_config_word(s_bridge, VIA686A_BASE_REG, address))			return -ENODEV;	}	if (PCIBIOS_SUCCESSFUL !=	    pci_read_config_word(s_bridge, VIA686A_ENABLE_REG, &val))		return -ENODEV;	if (!(val & 0x0001)) {		dev_warn(&adapter->dev, "enabling sensors\n");		if (PCIBIOS_SUCCESSFUL !=		    pci_write_config_word(s_bridge, VIA686A_ENABLE_REG,					  val | 0x0001))			return -ENODEV;	}	/* Reserve the ISA region */	if (!request_region(address, VIA686A_EXTENT, via686a_driver.name)) {		dev_err(&adapter->dev, "region 0x%x already in use!\n",			address);		return -ENODEV;	}	if (!(data = kmalloc(sizeof(struct via686a_data), GFP_KERNEL))) {		err = -ENOMEM;		goto ERROR0;	}	memset(data, 0, sizeof(struct via686a_data));	new_client = &data->client;	i2c_set_clientdata(new_client, data);	new_client->addr = address;	new_client->adapter = adapter;	new_client->driver = &via686a_driver;	new_client->flags = 0;	/* Fill in the remaining client fields and put into the global list */	strlcpy(new_client->name, client_name, I2C_NAME_SIZE);	data->valid = 0;	init_MUTEX(&data->update_lock);	/* Tell the I2C layer a new client has arrived */	if ((err = i2c_attach_client(new_client)))		goto ERROR3;	/* Initialize the VIA686A chip */	via686a_init_client(new_client);	/* Register sysfs hooks */	device_create_file(&new_client->dev, &dev_attr_in0_input);	device_create_file(&new_client->dev, &dev_attr_in1_input);	device_create_file(&new_client->dev, &dev_attr_in2_input);	device_create_file(&new_client->dev, &dev_attr_in3_input);	device_create_file(&new_client->dev, &dev_attr_in4_input);	device_create_file(&new_client->dev, &dev_attr_in0_min);	device_create_file(&new_client->dev, &dev_attr_in1_min);	device_create_file(&new_client->dev, &dev_attr_in2_min);	device_create_file(&new_client->dev, &dev_attr_in3_min);	device_create_file(&new_client->dev, &dev_attr_in4_min);	device_create_file(&new_client->dev, &dev_attr_in0_max);	device_create_file(&new_client->dev, &dev_attr_in1_max);	device_create_file(&new_client->dev, &dev_attr_in2_max);	device_create_file(&new_client->dev, &dev_attr_in3_max);	device_create_file(&new_client->dev, &dev_attr_in4_max);	device_create_file(&new_client->dev, &dev_attr_temp1_input);	device_create_file(&new_client->dev, &dev_attr_temp2_input);	device_create_file(&new_client->dev, &dev_attr_temp3_input);	device_create_file(&new_client->dev, &dev_attr_temp1_max);	device_create_file(&new_client->dev, &dev_attr_temp2_max);	device_create_file(&new_client->dev, &dev_attr_temp3_max);	device_create_file(&new_client->dev, &dev_attr_temp1_max_hyst);	device_create_file(&new_client->dev, &dev_attr_temp2_max_hyst);	device_create_file(&new_client->dev, &dev_attr_temp3_max_hyst);	device_create_file(&new_client->dev, &dev_attr_fan1_input);	device_create_file(&new_client->dev, &dev_attr_fan2_input);	device_create_file(&new_client->dev, &dev_attr_fan1_min);	device_create_file(&new_client->dev, &dev_attr_fan2_min);	device_create_file(&new_client->dev, &dev_attr_fan1_div);	device_create_file(&new_client->dev, &dev_attr_fan2_div);	device_create_file(&new_client->dev, &dev_attr_alarms);	return 0;ERROR3:	kfree(data);ERROR0:	release_region(address, VIA686A_EXTENT);	return err;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/943b0830cebe4711354945ed3cb44e84152aaca0/via686a.c/buggy/drivers/hwmon/via686a.c