summaryrefslogtreecommitdiffstats
path: root/drivers/staging/most
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/most')
-rw-r--r--drivers/staging/most/aim-cdev/cdev.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/staging/most/aim-cdev/cdev.c b/drivers/staging/most/aim-cdev/cdev.c
index 4bf0322a99eb..6ee4eb2177bd 100644
--- a/drivers/staging/most/aim-cdev/cdev.c
+++ b/drivers/staging/most/aim-cdev/cdev.c
@@ -246,7 +246,9 @@ start_copy:
return -EIO;
}
- to_copy = min(count, (size_t)mbo->processed_length - channel->mbo_offs);
+ to_copy = min_t(size_t,
+ count,
+ mbo->processed_length - channel->mbo_offs);
not_copied = copy_to_user(buf,
mbo->virt_address + channel->mbo_offs,