diff options
| author | Fam Zheng | 2017-04-26 04:03:49 +0200 |
|---|---|---|
| committer | Kevin Wolf | 2017-04-27 15:39:50 +0200 |
| commit | e914404efb9d2af79e08750c6700b642ea0d2ec7 (patch) | |
| tree | ca15bca9cb82d2e3ba9ff11550db6731336350a9 | |
| parent | qemu_iotests: Remove _readlink() (diff) | |
| download | qemu-e914404efb9d2af79e08750c6700b642ea0d2ec7.tar.gz qemu-e914404efb9d2af79e08750c6700b642ea0d2ec7.tar.xz qemu-e914404efb9d2af79e08750c6700b642ea0d2ec7.zip | |
block: Remove NULL check in bdrv_co_flush
Reported by Coverity. We already use bs in bdrv_inc_in_flight before
checking for NULL. It is unnecessary as all callers pass non-NULL bs, so
drop it.
Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| -rw-r--r-- | block/io.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/io.c b/block/io.c index a32fd1d9e5..80d6c62a85 100644 --- a/block/io.c +++ b/block/io.c @@ -2300,7 +2300,7 @@ int coroutine_fn bdrv_co_flush(BlockDriverState *bs) bdrv_inc_in_flight(bs); - if (!bs || !bdrv_is_inserted(bs) || bdrv_is_read_only(bs) || + if (!bdrv_is_inserted(bs) || bdrv_is_read_only(bs) || bdrv_is_sg(bs)) { goto early_exit; } |
