diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2021-08-12 16:06:24 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2021-08-26 17:02:00 +0100 |
commit | 8f1bdb0ea136c38cf963f5fafff103e1b6fb488d (patch) | |
tree | f6f91a9a038e62cd9c074305cd7abb2973b5848b /scripts/qapi/common.py | |
parent | 312c496a95430dcabe0028e5a68d595c9411aa91 (diff) | |
download | qemu-8f1bdb0ea136c38cf963f5fafff103e1b6fb488d.zip qemu-8f1bdb0ea136c38cf963f5fafff103e1b6fb488d.tar.gz qemu-8f1bdb0ea136c38cf963f5fafff103e1b6fb488d.tar.bz2 |
softmmu/physmem.c: Remove unneeded NULL check in qemu_ram_alloc_from_fd()
In the alignment check added to qemu_ram_alloc_from_fd() in commit
ce317be98db0dfdfa, the condition includes a check that 'mr' is not
NULL. This check is unnecessary because we can assume that the
caller always passes us a valid MemoryRegion, and indeed later in the
function we assume mr is not NULL when we pass it to file_ram_alloc()
as new_block->mr. Remove it.
Fixes: Coverity 1459867
Fixes: ce317be98d ("exec: fetch the alignment of Linux devdax pmem character device nodes")
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Jingqi Liu <jingqi.liu@intel.com>
Message-id: 20210812150624.29139-1-peter.maydell@linaro.org
Diffstat (limited to 'scripts/qapi/common.py')
0 files changed, 0 insertions, 0 deletions