ppc/pnv: Fix check on block device before updating drive contents
commit957c52aed5efcf036affb30907514262643f556a
authorCédric Le Goater <clg@kaod.org>
Tue, 2 Nov 2021 16:29:05 +0000 (2 17:29 +0100)
committerDavid Gibson <david@gibson.dropbear.id.au>
Mon, 8 Nov 2021 23:32:52 +0000 (9 10:32 +1100)
tree874ed43827c848ea155ce3291409699b01223a23
parenta23297479cc07812526fb6d9d213392dba555145
ppc/pnv: Fix check on block device before updating drive contents

Test is wrong and the backend can never updated. It could have led to
a QEMU crash but since the firmware deactivates flash access if a valid
layout is not detected, it went unnoticed.

Reported-by: Coverity CID 1465223
Fixes: 35dde5766211 ("ppc/pnv: Add a PNOR model")
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Message-Id: <20211102162905.762078-1-clg@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
hw/ppc/pnv_pnor.c