]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
i2c-amd8111: Missed cleanup
authorJean Delvare <khali@linux-fr.org>
Thu, 22 Mar 2007 18:49:00 +0000 (19:49 +0100)
committerJean Delvare <khali@arrakis.delvare>
Thu, 22 Mar 2007 18:49:00 +0000 (19:49 +0100)
I missed one cleanup in my previous patch.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
drivers/i2c/busses/i2c-amd8111.c

index e15f9e37716ada1b65ac7f4a2e3561e312dc097e..0c70f8293341c9aee6f7cc5e6206b57c51ef8742 100644 (file)
@@ -254,7 +254,8 @@ static s32 amd8111_access(struct i2c_adapter * adap, u16 addr,
                        break;
 
                case I2C_SMBUS_BLOCK_PROC_CALL:
-                       len = min_t(u8, data->block[0], 31);
+                       len = min_t(u8, data->block[0],
+                                   I2C_SMBUS_BLOCK_MAX - 1);
                        amd_ec_write(smbus, AMD_SMB_CMD, command);
                        amd_ec_write(smbus, AMD_SMB_BCNT, len);
                        for (i = 0; i < len; i++)