]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mfd: aat2870: Fix sparse error
authorSachin Kamat <sachin.kamat@linaro.org>
Tue, 10 Sep 2013 10:55:50 +0000 (16:25 +0530)
committerLee Jones <lee.jones@linaro.org>
Wed, 23 Oct 2013 15:20:44 +0000 (16:20 +0100)
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 <sachin.kamat@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/aat2870-core.c

index 6f68472e0ca633e9b0ec5f08db4f1389af93336e..14d9542a4eed8d1408c556c781795e0c24869a9c 100644 (file)
@@ -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;