lkml.org 
[lkml]   [2016]   [Feb]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/7] drivers: char: mem: fix IS_ERROR_VALUE usage
On Mon, Feb 15, 2016 at 03:35:21PM +0100, Andrzej Hajda wrote:
> diff --git a/drivers/char/mem.c b/drivers/char/mem.c
> index 4f6f94c..71025c2 100644
> --- a/drivers/char/mem.c
> +++ b/drivers/char/mem.c
> @@ -695,7 +695,7 @@ static loff_t memory_lseek(struct file *file, loff_t offset, int orig)
> offset += file->f_pos;
> case SEEK_SET:
> /* to avoid userland mistaking f_pos=-9 as -EBADF=-9 */
> - if (IS_ERR_VALUE((unsigned long long)offset)) {
> + if ((unsigned long long)offset >= -MAX_ERRNO) {
> ret = -EOVERFLOW;
> break;
> }

ACK

\
 
 \ /
  Last update: 2016-02-17 04:01    [W:0.149 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site