From: Roel Kluin Date: Wed, 28 Jan 2009 21:14:17 +0000 (+0100) Subject: Staging: poch: fix verification of memory area X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=dcbbcefb6a6d540b605421e85fbaa4cea3fef5a2;p=linux-2.6-omap-h63xx.git Staging: poch: fix verification of memory area fix verification of memory area Signed-off-by: Roel Kluin Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/poch/poch.c b/drivers/staging/poch/poch.c index ec343ef53a8..0d111ddfabb 100644 --- a/drivers/staging/poch/poch.c +++ b/drivers/staging/poch/poch.c @@ -1026,7 +1026,7 @@ static int poch_ioctl(struct inode *inode, struct file *filp, } break; case POCH_IOC_GET_COUNTERS: - if (access_ok(VERIFY_WRITE, argp, sizeof(struct poch_counters))) + if (!access_ok(VERIFY_WRITE, argp, sizeof(struct poch_counters))) return -EFAULT; spin_lock_irq(&channel->counters_lock);