summaryrefslogtreecommitdiff
path: root/drivers/staging/sep
diff options
context:
space:
mode:
authorMark Allyn <mark.a.allyn@intel.com>2011-04-11 04:03:28 +0400
committerGreg Kroah-Hartman <gregkh@suse.de>2011-04-26 04:05:28 +0400
commitc09c9ae0a8de89cbaba572b14f06f925d7cfa011 (patch)
treedabd5f83f86cf7ba5c949988d968164372888faa /drivers/staging/sep
parent95cd17c9f3734091a5811fabbd778e3f7b1f0789 (diff)
downloadlinux-c09c9ae0a8de89cbaba572b14f06f925d7cfa011.tar.xz
staging: sep: resolve issue with false zero length of page
Signed-off-by: Mark Allyn <mark.a.allyn@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/sep')
-rw-r--r--drivers/staging/sep/sep_driver.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/staging/sep/sep_driver.c b/drivers/staging/sep/sep_driver.c
index 890eede5e3f9..52342c17eadd 100644
--- a/drivers/staging/sep/sep_driver.c
+++ b/drivers/staging/sep/sep_driver.c
@@ -1095,13 +1095,16 @@ static int sep_lock_user_pages(struct sep_device *sep,
if (num_pages > 1) {
lli_array[num_pages - 1].block_size =
(app_virt_addr + data_size) & (~PAGE_MASK);
+ if (lli_array[num_pages - 1].block_size == 0)
+ lli_array[num_pages - 1].block_size = PAGE_SIZE;
dev_warn(&sep->pdev->dev,
- "lli_array[%x].bus_address is %08lx, lli_array[%x].block_size is %x\n",
+ "lli_array[%x].bus_address is "
+ "%08lx, lli_array[%x].block_size is %x\n",
num_pages - 1,
- (unsigned long)lli_array[count].bus_address,
+ (unsigned long)lli_array[num_pages -1].bus_address,
num_pages - 1,
- lli_array[count].block_size);
+ lli_array[num_pages -1].block_size);
}
/* Set output params according to the in_out flag */