ERROR3: i2c_detach_client(new_client); 
int pc87360_detect(struct i2c_adapter *adapter, int address, int kind){	int i;	struct i2c_client *new_client;	struct pc87360_data *data;	int err = 0;	const char *name = "pc87360";	int use_thermistors = 0;	if (!i2c_is_isa_adapter(adapter))		return -ENODEV;	if (!(data = kmalloc(sizeof(struct pc87360_data), GFP_KERNEL)))		return -ENOMEM;	memset(data, 0x00, sizeof(struct pc87360_data));	new_client = &data->client;	i2c_set_clientdata(new_client, data);	new_client->addr = address;	init_MUTEX(&data->lock);	new_client->adapter = adapter;	new_client->driver = &pc87360_driver;	new_client->flags = 0;	data->fannr = 2;	data->innr = 0;	data->tempnr = 0;	switch (devid) {	case 0xe8:		name = "pc87363";		break;	case 0xe4:		name = "pc87364";		data->fannr = 3;		break;	case 0xe5:		name = "pc87365";		data->fannr = extra_isa[0] ? 3 : 0;		data->innr = extra_isa[1] ? 11 : 0;		data->tempnr = extra_isa[2] ? 2 : 0;		break;	case 0xe9:		name = "pc87366";		data->fannr = extra_isa[0] ? 3 : 0;		data->innr = extra_isa[1] ? 14 : 0;		data->tempnr = extra_isa[2] ? 3 : 0;		break;	}	strcpy(new_client->name, name);	data->valid = 0;	init_MUTEX(&data->update_lock);	for (i = 0; i < 3; i++) {		if (((data->address[i] = extra_isa[i]))		 && !request_region(extra_isa[i], PC87360_EXTENT,		 		    pc87360_driver.name)) {			dev_err(&new_client->dev, "Region 0x%x-0x%x already "				"in use!\n", extra_isa[i],				extra_isa[i]+PC87360_EXTENT-1);			for (i--; i >= 0; i--)				release_region(extra_isa[i], PC87360_EXTENT);			err = -EBUSY;			goto ERROR1;		}	}	/* Retrieve the fans configuration from Super-I/O space */	if (data->fannr)		data->fan_conf = confreg[0] | (confreg[1] << 8);	if ((err = i2c_attach_client(new_client)))		goto ERROR2;	/* Use the correct reference voltage	   Unless both the VLM and the TMS logical devices agree to	   use an external Vref, the internal one is used. */	if (data->innr) {		i = pc87360_read_value(data, LD_IN, NO_BANK,				       PC87365_REG_IN_CONFIG);		if (data->tempnr) {			i &= pc87360_read_value(data, LD_TEMP, NO_BANK,						PC87365_REG_TEMP_CONFIG);		}		data->in_vref = (i&0x02) ? 3025 : 2966;		dev_dbg(&new_client->dev, "Using %s reference voltage\n",			(i&0x02) ? "external" : "internal");		data->vid_conf = confreg[3];		data->vrm = 90;	}	/* Fan clock dividers may be needed before any data is read */	for (i = 0; i < data->fannr; i++) {		if (FAN_CONFIG_MONITOR(data->fan_conf, i))			data->fan_status[i] = pc87360_read_value(data,					      LD_FAN, NO_BANK,					      PC87360_REG_FAN_STATUS(i));	}	if (init > 0) {		if (devid == 0xe9 && data->address[1]) /* PC87366 */			use_thermistors = confreg[2] & 0x40;		pc87360_init_client(new_client, use_thermistors);	}	/* Register sysfs hooks */	if (data->innr) {		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_in5_input);		device_create_file(&new_client->dev, &dev_attr_in6_input);		device_create_file(&new_client->dev, &dev_attr_in7_input);		device_create_file(&new_client->dev, &dev_attr_in8_input);		device_create_file(&new_client->dev, &dev_attr_in9_input);		device_create_file(&new_client->dev, &dev_attr_in10_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_in5_min);		device_create_file(&new_client->dev, &dev_attr_in6_min);		device_create_file(&new_client->dev, &dev_attr_in7_min);		device_create_file(&new_client->dev, &dev_attr_in8_min);		device_create_file(&new_client->dev, &dev_attr_in9_min);		device_create_file(&new_client->dev, &dev_attr_in10_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_in5_max);		device_create_file(&new_client->dev, &dev_attr_in6_max);		device_create_file(&new_client->dev, &dev_attr_in7_max);		device_create_file(&new_client->dev, &dev_attr_in8_max);		device_create_file(&new_client->dev, &dev_attr_in9_max);		device_create_file(&new_client->dev, &dev_attr_in10_max);		device_create_file(&new_client->dev, &dev_attr_in0_status);		device_create_file(&new_client->dev, &dev_attr_in1_status);		device_create_file(&new_client->dev, &dev_attr_in2_status);		device_create_file(&new_client->dev, &dev_attr_in3_status);		device_create_file(&new_client->dev, &dev_attr_in4_status);		device_create_file(&new_client->dev, &dev_attr_in5_status);		device_create_file(&new_client->dev, &dev_attr_in6_status);		device_create_file(&new_client->dev, &dev_attr_in7_status);		device_create_file(&new_client->dev, &dev_attr_in8_status);		device_create_file(&new_client->dev, &dev_attr_in9_status);		device_create_file(&new_client->dev, &dev_attr_in10_status);		device_create_file(&new_client->dev, &dev_attr_cpu0_vid);		device_create_file(&new_client->dev, &dev_attr_vrm);		device_create_file(&new_client->dev, &dev_attr_alarms_in);	}	if (data->tempnr) {		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_temp1_min);		device_create_file(&new_client->dev, &dev_attr_temp2_min);		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_temp1_crit);		device_create_file(&new_client->dev, &dev_attr_temp2_crit);		device_create_file(&new_client->dev, &dev_attr_temp1_status);		device_create_file(&new_client->dev, &dev_attr_temp2_status);		device_create_file(&new_client->dev, &dev_attr_alarms_temp);	}	if (data->tempnr == 3) {		device_create_file(&new_client->dev, &dev_attr_temp3_input);		device_create_file(&new_client->dev, &dev_attr_temp3_min);		device_create_file(&new_client->dev, &dev_attr_temp3_max);		device_create_file(&new_client->dev, &dev_attr_temp3_crit);		device_create_file(&new_client->dev, &dev_attr_temp3_status);	}	if (data->innr == 14) {		device_create_file(&new_client->dev, &dev_attr_temp4_input);		device_create_file(&new_client->dev, &dev_attr_temp5_input);		device_create_file(&new_client->dev, &dev_attr_temp6_input);		device_create_file(&new_client->dev, &dev_attr_temp4_min);		device_create_file(&new_client->dev, &dev_attr_temp5_min);		device_create_file(&new_client->dev, &dev_attr_temp6_min);		device_create_file(&new_client->dev, &dev_attr_temp4_max);		device_create_file(&new_client->dev, &dev_attr_temp5_max);		device_create_file(&new_client->dev, &dev_attr_temp6_max);		device_create_file(&new_client->dev, &dev_attr_temp4_crit);		device_create_file(&new_client->dev, &dev_attr_temp5_crit);		device_create_file(&new_client->dev, &dev_attr_temp6_crit);		device_create_file(&new_client->dev, &dev_attr_temp4_status);		device_create_file(&new_client->dev, &dev_attr_temp5_status);		device_create_file(&new_client->dev, &dev_attr_temp6_status);	}	if (data->fannr) {		if (FAN_CONFIG_MONITOR(data->fan_conf, 0)) {			device_create_file(&new_client->dev,					   &dev_attr_fan1_input);			device_create_file(&new_client->dev,					   &dev_attr_fan1_min);			device_create_file(&new_client->dev,					   &dev_attr_fan1_div);			device_create_file(&new_client->dev,					   &dev_attr_fan1_status);		}		if (FAN_CONFIG_MONITOR(data->fan_conf, 1)) {			device_create_file(&new_client->dev,					   &dev_attr_fan2_input);			device_create_file(&new_client->dev,					   &dev_attr_fan2_min);			device_create_file(&new_client->dev,					   &dev_attr_fan2_div);			device_create_file(&new_client->dev,					   &dev_attr_fan2_status);		}		if (FAN_CONFIG_CONTROL(data->fan_conf, 0))			device_create_file(&new_client->dev, &dev_attr_pwm1);		if (FAN_CONFIG_CONTROL(data->fan_conf, 1))			device_create_file(&new_client->dev, &dev_attr_pwm2);	}	if (data->fannr == 3) {		if (FAN_CONFIG_MONITOR(data->fan_conf, 2)) {			device_create_file(&new_client->dev,					   &dev_attr_fan3_input);			device_create_file(&new_client->dev,					   &dev_attr_fan3_min);			device_create_file(&new_client->dev,					   &dev_attr_fan3_div);			device_create_file(&new_client->dev,					   &dev_attr_fan3_status);		}		if (FAN_CONFIG_CONTROL(data->fan_conf, 2))			device_create_file(&new_client->dev, &dev_attr_pwm3);	}	return 0;ERROR2:	for (i = 0; i < 3; i++) {		if (data->address[i]) {			release_region(data->address[i], PC87360_EXTENT);		}	}ERROR1:	kfree(data);	return err;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/943b0830cebe4711354945ed3cb44e84152aaca0/pc87360.c/clean/drivers/hwmon/pc87360.c