data->lm75[1] = kmalloc(sizeof(struct i2c_client), GFP_KERNEL); 
data->lm75[1] = kzalloc(sizeof(struct i2c_client), GFP_KERNEL); 
static int asb100_detect_subclients(struct i2c_adapter *adapter, int address,		int kind, struct i2c_client *new_client){	int i, id, err;	struct asb100_data *data = i2c_get_clientdata(new_client);	data->lm75[0] = kmalloc(sizeof(struct i2c_client), GFP_KERNEL);	if (!(data->lm75[0])) {		err = -ENOMEM;		goto ERROR_SC_0;	}	memset(data->lm75[0], 0x00, sizeof(struct i2c_client));	data->lm75[1] = kmalloc(sizeof(struct i2c_client), GFP_KERNEL);	if (!(data->lm75[1])) {		err = -ENOMEM;		goto ERROR_SC_1;	}	memset(data->lm75[1], 0x00, sizeof(struct i2c_client));	id = i2c_adapter_id(adapter);	if (force_subclients[0] == id && force_subclients[1] == address) {		for (i = 2; i <= 3; i++) {			if (force_subclients[i] < 0x48 ||			    force_subclients[i] > 0x4f) {				dev_err(&new_client->dev, "invalid subclient "					"address %d; must be 0x48-0x4f\n",					force_subclients[i]);				err = -ENODEV;				goto ERROR_SC_2;			}		}		asb100_write_value(new_client, ASB100_REG_I2C_SUBADDR,					(force_subclients[2] & 0x07) |					((force_subclients[3] & 0x07) <<4));		data->lm75[0]->addr = force_subclients[2];		data->lm75[1]->addr = force_subclients[3];	} else {		int val = asb100_read_value(new_client, ASB100_REG_I2C_SUBADDR);		data->lm75[0]->addr = 0x48 + (val & 0x07);		data->lm75[1]->addr = 0x48 + ((val >> 4) & 0x07);	}	if(data->lm75[0]->addr == data->lm75[1]->addr) {		dev_err(&new_client->dev, "duplicate addresses 0x%x "				"for subclients\n", data->lm75[0]->addr);		err = -ENODEV;		goto ERROR_SC_2;	}	for (i = 0; i <= 1; i++) {		i2c_set_clientdata(data->lm75[i], NULL);		data->lm75[i]->adapter = adapter;		data->lm75[i]->driver = &asb100_driver;		data->lm75[i]->flags = 0;		strlcpy(data->lm75[i]->name, "asb100 subclient", I2C_NAME_SIZE);	}	if ((err = i2c_attach_client(data->lm75[0]))) {		dev_err(&new_client->dev, "subclient %d registration "			"at address 0x%x failed.\n", i, data->lm75[0]->addr);		goto ERROR_SC_2;	}	if ((err = i2c_attach_client(data->lm75[1]))) {		dev_err(&new_client->dev, "subclient %d registration "			"at address 0x%x failed.\n", i, data->lm75[1]->addr);		goto ERROR_SC_3;	}	return 0;/* Undo inits in case of errors */ERROR_SC_3:	i2c_detach_client(data->lm75[0]);ERROR_SC_2:	kfree(data->lm75[1]);ERROR_SC_1:	kfree(data->lm75[0]);ERROR_SC_0:	return err;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/ba9c2e8d15da029ea3051c95e446b2d638ef02e2/asb100.c/clean/drivers/hwmon/asb100.c