diff mbox series

[PULL,3/3] module: ignore NULL type

Message ID 20200721140245.14634-4-kraxel@redhat.com (mailing list archive)
State New, archived
Headers show
Series [PULL,1/3] xhci: fix valid.max_access_size to access address registers | expand

Commit Message

Gerd Hoffmann July 21, 2020, 2:02 p.m. UTC
Just return in case module_load_qom_one(NULL) is called.
vga_interface_available() can do that.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-Id: <20200720100352.2477-3-kraxel@redhat.com>
---
 util/module.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/util/module.c b/util/module.c
index 90e9bd42c6c7..0ab00851f0a4 100644
--- a/util/module.c
+++ b/util/module.c
@@ -275,6 +275,9 @@  void module_load_qom_one(const char *type)
 {
     int i;
 
+    if (!type) {
+        return;
+    }
     if (module_loaded_qom_all) {
         return;
     }