[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PULL 13/34] block: Remove NULL check in bdrv_co_flush
From: |
Kevin Wolf |
Subject: |
[Qemu-block] [PULL 13/34] block: Remove NULL check in bdrv_co_flush |
Date: |
Fri, 28 Apr 2017 22:33:21 +0200 |
From: Fam Zheng <address@hidden>
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 <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
block/io.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/io.c b/block/io.c
index a32fd1d..80d6c62 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;
}
--
1.8.3.1
- [Qemu-block] [PULL 01/34] block: Constify data passed by pointer to blk_name, (continued)
- [Qemu-block] [PULL 01/34] block: Constify data passed by pointer to blk_name, Kevin Wolf, 2017/04/28
- [Qemu-block] [PULL 03/34] file-win32: Remove unnecessary include, Kevin Wolf, 2017/04/28
- [Qemu-block] [PULL 04/34] Revert "block/io: Comment out permission assertions", Kevin Wolf, 2017/04/28
- [Qemu-block] [PULL 06/34] migration: Call blk_resume_after_migration() for postcopy, Kevin Wolf, 2017/04/28
- [Qemu-block] [PULL 05/34] qemu-img: simplify img_convert, Kevin Wolf, 2017/04/28
- [Qemu-block] [PULL 08/34] qemu-iotests: Test postcopy migration, Kevin Wolf, 2017/04/28
- [Qemu-block] [PULL 09/34] block: An empty filename counts as no filename, Kevin Wolf, 2017/04/28
- [Qemu-block] [PULL 10/34] iotests/051: Add test for empty filename, Kevin Wolf, 2017/04/28
- [Qemu-block] [PULL 11/34] qemu-iotests: Remove PERL_PROG and BC_PROG, Kevin Wolf, 2017/04/28
- [Qemu-block] [PULL 12/34] qemu_iotests: Remove _readlink(), Kevin Wolf, 2017/04/28
- [Qemu-block] [PULL 13/34] block: Remove NULL check in bdrv_co_flush,
Kevin Wolf <=
- [Qemu-block] [PULL 14/34] iotests: Launch qemu-nbd with -e 42, Kevin Wolf, 2017/04/28
- [Qemu-block] [PULL 15/34] Issue a deprecation warning if the user specifies the "-hdachs" option., Kevin Wolf, 2017/04/28
- [Qemu-block] [PULL 16/34] iotests: Fix typo in 026, Kevin Wolf, 2017/04/28
- [Qemu-block] [PULL 07/34] qemu-iotests: Filter HMP readline escape characters, Kevin Wolf, 2017/04/28
- [Qemu-block] [PULL 17/34] iotests: 109: Filter out "len" of failed jobs, Kevin Wolf, 2017/04/28
- [Qemu-block] [PULL 18/34] block: Do not unref bs->file on error in BD's open, Kevin Wolf, 2017/04/28
- [Qemu-block] [PULL 19/34] block: fix alignment calculations in bdrv_co_do_zero_pwritev, Kevin Wolf, 2017/04/28
- [Qemu-block] [PULL 20/34] qemu-img/convert: Use @opts for one thing only, Kevin Wolf, 2017/04/28
- [Qemu-block] [PULL 23/34] block/vhdx: Make vhdx_create() always set errp, Kevin Wolf, 2017/04/28