From: Sachin Kamat Date: Tue, 10 Sep 2013 10:55:50 +0000 (+0530) Subject: mfd: aat2870: Fix sparse error X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=ecf67ac335bba0867ce7c6470ae4a3574e0f2838;p=linux-beck.git mfd: aat2870: Fix sparse error Fixes the following error: drivers/mfd/aat2870-core.c:296:20: error: incompatible types in comparison expression (different type sizes) Signed-off-by: Sachin Kamat Signed-off-by: Lee Jones --- diff --git a/drivers/mfd/aat2870-core.c b/drivers/mfd/aat2870-core.c index 6f68472e0ca6..14d9542a4eed 100644 --- a/drivers/mfd/aat2870-core.c +++ b/drivers/mfd/aat2870-core.c @@ -293,7 +293,7 @@ static ssize_t aat2870_reg_write_file(struct file *file, unsigned long addr, val; int ret; - buf_size = min(count, (sizeof(buf)-1)); + buf_size = min(count, (size_t)(sizeof(buf)-1)); if (copy_from_user(buf, user_buf, buf_size)) { dev_err(aat2870->dev, "Failed to copy from user\n"); return -EFAULT;