aboutsummaryrefslogtreecommitdiff
path: root/hw/core
diff options
context:
space:
mode:
Diffstat (limited to 'hw/core')
-rw-r--r--hw/core/loader.c3
-rw-r--r--hw/core/qdev.c1
2 files changed, 2 insertions, 2 deletions
diff --git a/hw/core/loader.c b/hw/core/loader.c
index bf17b42cbe..f72930ca4a 100644
--- a/hw/core/loader.c
+++ b/hw/core/loader.c
@@ -611,8 +611,9 @@ static int load_uboot_image(const char *filename, hwaddr *ep, hwaddr *loadaddr,
return -1;
size = read(fd, hdr, sizeof(uboot_image_header_t));
- if (size < 0)
+ if (size < sizeof(uboot_image_header_t)) {
goto out;
+ }
bswap_uboot_header(hdr);
diff --git a/hw/core/qdev.c b/hw/core/qdev.c
index 71ff95fd71..0ce45a2019 100644
--- a/hw/core/qdev.c
+++ b/hw/core/qdev.c
@@ -37,7 +37,6 @@
#include "hw/boards.h"
#include "hw/sysbus.h"
#include "qapi-event.h"
-#include "migration/vmstate.h"
bool qdev_hotplug = false;
static bool qdev_hot_added = false;