block: Don't call blk_bs() twice in bdrv_lookup_bs()
PATCH 1/1 block: Don't call blk_bs() twice in bdrv_lookup_bs()
Signed-off-by Alberto Garcia <[email protected]>
--- block.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
block.c +3 -3
@@ -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 blk_bs (blk); +return bs; } }
Signature · 1 line
2.6.1
Kevin Wolf
AppliedAm 26.10.2015 um 15:46 hat Alberto Garcia geschrieben:
Quoted 1 line
Signed-off-by Alberto Garcia <[email protected]>
Thanks, applied to the block branch.
Kevin