mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-05-09 17:07:00 +00:00
dm: remove redundant null check in unregister_mem_init
return value 'err' of mmio_rb_lookup() being 0 ensures 'entry' is not NULL, hence checking it before 'free(entry)' is unnecessary. Tracked-On: #6157 Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
This commit is contained in:
parent
f87e46bf45
commit
ccf606bded
@ -249,8 +249,7 @@ unregister_mem_int(struct mmio_rb_tree *rbt, struct mem_range *memp)
|
||||
if (mmio_hint == entry)
|
||||
mmio_hint = NULL;
|
||||
|
||||
if (entry)
|
||||
free(entry);
|
||||
free(entry);
|
||||
}
|
||||
}
|
||||
pthread_rwlock_unlock(&mmio_rwlock);
|
||||
|
Loading…
Reference in New Issue
Block a user