Merge branch 'topic/soundcore-preclaim' into for-linus
[pandora-kernel.git] / drivers / parisc / eisa_eeprom.c
index 685d94e..8c0b26e 100644 (file)
@@ -55,7 +55,7 @@ static ssize_t eisa_eeprom_read(struct file * file,
        ssize_t ret;
        int i;
        
-       if (*ppos >= HPEE_MAX_LENGTH)
+       if (*ppos < 0 || *ppos >= HPEE_MAX_LENGTH)
                return 0;
        
        count = *ppos + count < HPEE_MAX_LENGTH ? count : HPEE_MAX_LENGTH - *ppos;