mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-06-07 17:46:15 +00:00
dm: cleanup assert in core.c
- check input by condition check, instead of assert. - remove redundant header file including for some files. Tracked-On: #3252 Signed-off-by: Yonghua Huang <yonghua.huang@intel.com> Reviewed-by: Shuo Liu <shuo.a.liu@intel.com>
This commit is contained in:
committed by
ACRN System Integration
parent
012ec75163
commit
842da0ac1e
@@ -2291,7 +2291,8 @@ pci_emul_cfgdata(struct vmctx *ctx, int vcpu, int in, int port, int bytes,
|
||||
{
|
||||
int coff;
|
||||
|
||||
assert(bytes == 1 || bytes == 2 || bytes == 4);
|
||||
if ((bytes != 1) && (bytes != 2) && (bytes != 4))
|
||||
return -1;
|
||||
|
||||
coff = cfgoff + (port - CONF1_DATA_PORT);
|
||||
if (cfgenable) {
|
||||
|
||||
Reference in New Issue
Block a user