if (slice >= blk->slices) return -1; 
if (slice >= USER_EEPROM_SLICES) return; 
static int max6875_update_slice(struct i2c_client *client,				struct eeprom_block *blk,				int slice){	struct max6875_data *data = i2c_get_clientdata(client);	int i, j, addr, count;	u8 rdbuf[SLICE_SIZE];	int retval = 0;	if (slice >= blk->slices)		return -1;	down(&data->update_lock);	if (!(blk->valid & (1 << slice)) ||	    (jiffies - blk->updated[slice] > 300 * HZ) ||	    (jiffies < blk->updated[slice])) {		dev_dbg(&client->dev, "Starting eeprom update, slice %u, base %u\n",			slice, blk->base);		addr = blk->base + (slice << SLICE_BITS);		count = blk->size - (slice << SLICE_BITS);		if (count > SLICE_SIZE) {			count = SLICE_SIZE;		}		/* Preset the read address */		if (addr < 0x100) {			/* select the register */			if (i2c_smbus_write_byte(client, addr & 0xFF)) {				dev_dbg(&client->dev, "max6875 register select has failed!\n");				retval = -1;				goto exit;			}		} else {			/* select the eeprom */			if (i2c_smbus_write_byte_data(client, addr >> 8, addr & 0xFF)) {				dev_dbg(&client->dev, "max6875 address set has failed!\n");				retval = -1;				goto exit;			}		}		if (i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_READ_I2C_BLOCK)) {			if (i2c_smbus_read_i2c_block_data(client, MAX6875_CMD_BLOCK_READ,							  rdbuf) != SLICE_SIZE)			{				retval = -1;				goto exit;			}			memcpy(&blk->data[slice << SLICE_BITS], rdbuf, count);		} else {			for (i = 0; i < count; i++) {				j = i2c_smbus_read_byte(client);				if (j < 0)				{					retval = -1;					goto exit;				}				blk->data[(slice << SLICE_BITS) + i] = (u8) j;			}		}		blk->updated[slice] = jiffies;		blk->valid |= (1 << slice);	}	exit:	up(&data->update_lock);	return retval;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/bc769ff8f5f6e3d249bfde082653e5bf1c2b5698/max6875.c/clean/drivers/i2c/chips/max6875.c