projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3c07587
)
block: Don't call blk_bs() twice in bdrv_lookup_bs()
author
Alberto Garcia
<berto@igalia.com>
Mon, 26 Oct 2015 14:46:49 +0000
(16:46 +0200)
committer
Kevin Wolf
<kwolf@redhat.com>
Wed, 11 Nov 2015 15:22:46 +0000
(16:22 +0100)
Signed-off-by: Alberto Garcia <berto@igalia.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block.c
patch
|
blob
|
history
diff --git
a/block.c
b/block.c
index e9f40dc76836c3ef91ca2cbee44ee5b6c149c554..eb8158ac33b2f26cb42191d1fe2601ac2ab98820 100644
(file)
--- a/
block.c
+++ b/
block.c
@@
-2683,12
+2683,12
@@
BlockDriverState *bdrv_lookup_bs(const char *device,
blk = blk_by_name(device);
if (blk) {
- if (!blk_bs(blk)) {
+ bs = blk_bs(blk);
+ if (!bs) {
error_setg(errp, "Device '%s' has no medium", device);
- return NULL;
}
- return b
lk_bs(blk)
;
+ return b
s
;
}
}