A non-optional string property like "mem-path" cannot be null.  Drop
the useless check.

Signed-off-by: Markus Armbruster <[email protected]>
---
 backends/hostmem-file.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/backends/hostmem-file.c b/backends/hostmem-file.c
index 08d0382d76f..1e8f8ae6aa8 100644
--- a/backends/hostmem-file.c
+++ b/backends/hostmem-file.c
@@ -48,11 +48,6 @@ file_backend_memory_alloc(HostMemoryBackend *backend, Error 
**errp)
     g_autofree gchar *name = NULL;
     uint32_t ram_flags;
 
-    if (!fb->mem_path) {
-        error_setg(errp, "mem-path property not set");
-        return false;
-    }
-
     switch (fb->rom) {
     case ON_OFF_AUTO_AUTO:
         /* Traditionally, opening the file readonly always resulted in ROM. */
-- 
2.55.0


Reply via email to