summaryrefslogtreecommitdiff
path: root/block/io.c
diff options
context:
space:
mode:
authorFam Zheng <famz@redhat.com>2017-04-26 10:03:49 +0800
committerKevin Wolf <kwolf@redhat.com>2017-04-27 15:39:50 +0200
commite914404efb9d2af79e08750c6700b642ea0d2ec7 (patch)
treeca15bca9cb82d2e3ba9ff11550db6731336350a9 /block/io.c
parent242e496b39d364765e428e182b3bdeee94cc5c84 (diff)
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>
Diffstat (limited to 'block/io.c')
-rw-r--r--block/io.c2
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;
}