Skip to content

Commit

Permalink
csr1212: add check for !valid
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jody McIntyre authored and Jody McIntyre committed Nov 22, 2005
1 parent 5303a98 commit a96074e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/ieee1394/csr1212.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a96074e

Please sign in to comment.