pinctrl: pinconf: fix comparison of different types

Fix the following sparse warning:

drivers/pinctrl/pinconf.c:521:20: error: incompatible types in comparison expression (different type sizes)

Signed-off-by: Jingoo Han <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
This commit is contained in:
Jingoo Han 2013-08-06 18:10:20 +09:00 • committed by Linus Walleij
commit 9b6803542e

View file

@ -512,7 +512,7 @@ static int pinconf_dbg_config_write(struct file *file,
int i;
/* Get userspace string and assure termination */
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))
return -EFAULT;
buf[buf_size] = 0;