summaryrefslogtreecommitdiff
path: root/hw/tpm
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2014-12-04 10:26:55 +0100
committerMichael Tokarev <mjt@tls.msk.ru>2014-12-10 11:30:55 +0300
commit24588100ab39afead7b9a0e9c61182a02320a1b9 (patch)
treee45c7d37fccf11ce71abb612cf547d21b95561b6 /hw/tpm
parent4ad608803c46c0acc09114a2e8352742ffd20b6b (diff)
downloadqemu-24588100ab39afead7b9a0e9c61182a02320a1b9.tar.gz
Drop superfluous conditionals around g_strdup()
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'hw/tpm')
-rw-r--r--hw/tpm/tpm_passthrough.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/hw/tpm/tpm_passthrough.c b/hw/tpm/tpm_passthrough.c
index 56e9e0f8a2..2bf3c6fd61 100644
--- a/hw/tpm/tpm_passthrough.c
+++ b/hw/tpm/tpm_passthrough.c
@@ -400,9 +400,7 @@ static int tpm_passthrough_handle_device_opts(QemuOpts *opts, TPMBackend *tb)
const char *value;
value = qemu_opt_get(opts, "cancel-path");
- if (value) {
- tb->cancel_path = g_strdup(value);
- }
+ tb->cancel_path = g_strdup(value);
value = qemu_opt_get(opts, "path");
if (!value) {