]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/staging/poch/poch.c
Staging: poch: fix verification of memory area
[linux-2.6-omap-h63xx.git] / drivers / staging / poch / poch.c
index ec343ef53a85c63b54393a06f4ee95c77e1dc12c..0d111ddfabb22c15408b14b891c094022fe85225 100644 (file)
@@ -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);