upgrade to linux 2.6.10-1.12_FC2
[linux-2.6.git] / fs / openpromfs / inode.c
index 5910d6b..13343ad 100644 (file)
@@ -94,8 +94,6 @@ static ssize_t property_read(struct file *filp, char __user *buf,
        openprom_property *op;
        char buffer[64];
        
-       if (*ppos >= 0xffffff || count >= 0xffffff)
-               return -EINVAL;
        if (!filp->private_data) {
                node = nodes[(u16)((long)inode->u.generic_ip)].node;
                i = ((u32)(long)inode->u.generic_ip) >> 16;
@@ -168,6 +166,8 @@ static ssize_t property_read(struct file *filp, char __user *buf,
                op = (openprom_property *)filp->private_data;
        if (!count || !(op->len || (op->flag & OPP_ASCIIZ)))
                return 0;
+       if (*ppos >= 0xffffff || count >= 0xffffff)
+               return -EINVAL;
        if (op->flag & OPP_STRINGLIST) {
                for (k = 0, p = op->value; p < op->value + op->len; p++)
                        if (!*p)