diff options
-rw-r--r-- | hw/s390x/sclp.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/hw/s390x/sclp.c b/hw/s390x/sclp.c index fca37f511e..540226c6df 100644 --- a/hw/s390x/sclp.c +++ b/hw/s390x/sclp.c @@ -26,7 +26,12 @@ static inline SCLPDevice *get_sclp_device(void) { - return SCLP(object_resolve_path_type("", TYPE_SCLP, NULL)); + static SCLPDevice *sclp; + + if (!sclp) { + sclp = SCLP(object_resolve_path_type("", TYPE_SCLP, NULL)); + } + return sclp; } /* Provide information about the configuration, CPUs and storage */ |