mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
pinctrl: remove an unnecessary cast
sizeof() is already size_t so there is no need to cast here. Generally, casting inside the min() macro instead of using min_t() is considered bad style. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
3b59e432ec
commit
81d36c4fff
1 changed files with 1 additions and 1 deletions
|
@ -508,7 +508,7 @@ static ssize_t pinconf_dbg_config_write(struct file *file,
|
|||
int i;
|
||||
|
||||
/* Get userspace string and assure termination */
|
||||
buf_size = min(count, (size_t)(sizeof(buf)-1));
|
||||
buf_size = min(count, sizeof(buf) - 1);
|
||||
if (copy_from_user(buf, user_buf, buf_size))
|
||||
return -EFAULT;
|
||||
buf[buf_size] = 0;
|
||||
|
|
Loading…
Reference in a new issue