]> err.no Git - linux-2.6/commitdiff
csr1212: add check for !valid
authorJody McIntyre <scjdy@steamballoon.com>
Tue, 22 Nov 2005 17:17:14 +0000 (12:17 -0500)
committerJody McIntyre <scjody@modernduck.com>
Tue, 22 Nov 2005 17:17:14 +0000 (12:17 -0500)
Don't read the keyval if there's already a valid one in place.  May not be
necessary but shouldn't hurt.

Signed-off-by: Jody McIntyre <scjdy@steamballoon.com>
drivers/ieee1394/csr1212.c

index 4812d59e8976289946f7e8feaa6b01c1f31bb963..15773544234b496c7fd10645dae7bd6e0b5751ba 100644 (file)
@@ -1618,7 +1618,8 @@ int csr1212_parse_csr(struct csr1212_csr *csr)
         * and make cache regions for them */
        for (dentry = csr->root_kv->value.directory.dentries_head;
             dentry; dentry = dentry->next) {
-               if (dentry->kv->key.id == CSR1212_KV_ID_EXTENDED_ROM) {
+               if (dentry->kv->key.id == CSR1212_KV_ID_EXTENDED_ROM &&
+                       !dentry->kv->valid) {
                        ret = _csr1212_read_keyval(csr, dentry->kv);
                        if (ret != CSR1212_SUCCESS)
                                return ret;