aboutsummaryrefslogtreecommitdiff
path: root/hw/block-common.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/block-common.c')
-rw-r--r--hw/block-common.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/hw/block-common.c b/hw/block-common.c
index 0f1b64ec95..d21ec3ada1 100644
--- a/hw/block-common.c
+++ b/hw/block-common.c
@@ -18,9 +18,7 @@ void blkconf_serial(BlockConf *conf, char **serial)
if (!*serial) {
/* try to fall back to value set with legacy -drive serial=... */
dinfo = drive_get_by_blockdev(conf->bs);
- if (dinfo->serial) {
- *serial = g_strdup(dinfo->serial);
- }
+ *serial = g_strdup(dinfo->serial);
}
}