HV: Logical conjunction needs brackets

The bracket is required when the level of precedence of
the operators is less than 13. Add the bracket to logical
conjunctions. The commit applys the rule to the files under

Signed-off-by: Yang, Yu-chu <yu-chu.yang@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
Yang, Yu-chu
2018-07-25 14:55:25 -07:00
committed by wenlingz
parent 6f1c5fa007
commit 2fbf70780e
22 changed files with 72 additions and 72 deletions

View File

@@ -490,7 +490,7 @@ void register_io_emulation_handler(struct vm *vm, struct vm_io_range *range,
{
struct vm_io_handler *handler = NULL;
if (io_read_fn_ptr == NULL || io_write_fn_ptr == NULL) {
if ((io_read_fn_ptr == NULL) || (io_write_fn_ptr == NULL)) {
pr_err("Invalid IO handler.");
return;
}
@@ -512,7 +512,7 @@ int register_mmio_emulation_handler(struct vm *vm,
int status = -EINVAL;
struct mem_io_node *mmio_node;
if (vm->hw.created_vcpus > 0U && vm->hw.vcpu_array[0]->launched) {
if ((vm->hw.created_vcpus > 0U) && vm->hw.vcpu_array[0]->launched) {
ASSERT(false, "register mmio handler after vm launched");
return status;
}