hv: fix "Expression is not boolean"
The result of evaluate expression,it's type should be boolean. Tracked-On: #861 Signed-off-by: Huihuang Shi <huihuang.shi@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
parent
11102cfa45
commit
48b3cd92ed
|
@ -211,12 +211,12 @@ hv_emulate_pio(const struct acrn_vcpu *vcpu, struct io_request *io_req)
|
|||
}
|
||||
|
||||
if (pio_req->direction == REQUEST_WRITE) {
|
||||
if (handler->io_write) {
|
||||
if (handler->io_write != NULL) {
|
||||
handler->io_write(vm, port, size, pio_req->value & mask);
|
||||
}
|
||||
pr_dbg("IO write on port %04x, data %08x", port, pio_req->value & mask);
|
||||
} else {
|
||||
if (handler->io_read) {
|
||||
if (handler->io_read != NULL) {
|
||||
pio_req->value = handler->io_read(vm, port, size);
|
||||
}
|
||||
pr_dbg("IO read on port %04x, data %08x", port, pio_req->value);
|
||||
|
@ -264,7 +264,7 @@ hv_emulate_mmio(struct acrn_vcpu *vcpu, struct io_request *io_req)
|
|||
return -EIO;
|
||||
} else {
|
||||
/* Handle this MMIO operation */
|
||||
if (mmio_handler->read_write) {
|
||||
if (mmio_handler->read_write != NULL) {
|
||||
status = mmio_handler->read_write(io_req, mmio_handler->handler_private_data);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -326,7 +326,7 @@ static bool derive_aek(uint8_t *attkb_key)
|
|||
uint32_t ikm_len;
|
||||
uint32_t max_svn_idx;
|
||||
|
||||
if ((!attkb_key) || (g_key_info.num_seeds == 0U) ||
|
||||
if ((attkb_key == NULL) || (g_key_info.num_seeds == 0U) ||
|
||||
(g_key_info.num_seeds > BOOTLOADER_SEED_MAX_ENTRIES)) {
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue