Commit a5bbe8fd authored by Mukesh Ojha's avatar Mukesh Ojha Committed by Michael Ellerman

powerpc/powernv/opal-dump : Handles opal_dump_info properly

Moves the return value check of 'opal_dump_info' to a proper place which
was previously unnecessarily filling all the dump info even on failure.
Signed-off-by: default avatarMukesh Ojha <mukesh02@linux.vnet.ibm.com>
Acked-by: default avatarStewart Smith <stewart@linux.vnet.ibm.com>
Acked-by: default avatarJeremy Kerr <jk@ozlabs.org>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent edd00b83
......@@ -225,13 +225,16 @@ static int64_t dump_read_info(uint32_t *dump_id, uint32_t *dump_size, uint32_t *
if (rc == OPAL_PARAMETER)
rc = opal_dump_info(&id, &size);
if (rc) {
pr_warn("%s: Failed to get dump info (%d)\n",
__func__, rc);
return rc;
}
*dump_id = be32_to_cpu(id);
*dump_size = be32_to_cpu(size);
*dump_type = be32_to_cpu(type);
if (rc)
pr_warn("%s: Failed to get dump info (%d)\n",
__func__, rc);
return rc;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment