Skip to content

Commit

Permalink
phb4: Use the return value of phb4_fenced() in phb4_get_diag_data()
Browse files Browse the repository at this point in the history
phb4_get_diag_data() checks the flags for the PHB4_AIB_FENCED after
having called phb4_fenced(). This information is returned by
phb4_fenced().

This patch was prompted by an unused return value warning in Coverity.

Fixes: CID 163734
Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
  • Loading branch information
cyrilbur-ibm authored and stewartsmith committed Aug 6, 2018
1 parent 1c62f56 commit 0d96d56
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions hw/phb4.c
Original file line number Diff line number Diff line change
Expand Up @@ -3755,6 +3755,7 @@ static int64_t phb4_get_diag_data(struct phb *phb,
void *diag_buffer,
uint64_t diag_buffer_len)
{
bool fenced;
struct phb4 *p = phb_to_phb4(phb);
struct OpalIoPhb4ErrorData *data = diag_buffer;

Expand All @@ -3767,10 +3768,10 @@ static int64_t phb4_get_diag_data(struct phb *phb,
* Dummy check for fence so that phb4_read_phb_status knows
* whether to use ASB or AIB
*/
phb4_fenced(p);
fenced = phb4_fenced(p);
phb4_read_phb_status(p, data);

if (!(p->flags & PHB4_AIB_FENCED))
if (!fenced)
phb4_eeh_dump_regs(p);

/*
Expand Down

0 comments on commit 0d96d56

Please sign in to comment.