]> git.proxmox.com Git - qemu.git/commit
blockdev: drop redundant proto_drv check
authorStefan Hajnoczi <stefanha@redhat.com>
Mon, 24 Jun 2013 15:13:12 +0000 (17:13 +0200)
committerKevin Wolf <kwolf@redhat.com>
Fri, 28 Jun 2013 07:20:26 +0000 (09:20 +0200)
commitcb78466ef60ccf707a6f38a1294c435b65a828e0
tree1d1c42ab7247bd4a9ba1a170f45623685f8b6ee6
parent98d2c6f2cd80afaa2dc10091f5e35a97c181e4f5
blockdev: drop redundant proto_drv check

It is not necessary to check that we can find a protocol block driver
since we create or open the image file.  This produces the error that we
need anyway.

Besides, the QERR_INVALID_BLOCK_FORMAT is inappropriate since the
protocol is incorrect rather than the format.

Also drop an empty line between bdrv_open() and checking its return
value.  This may be due to copy-pasting from earlier code that performed
other operations before handling errors.

Reported-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
blockdev.c