hw/block/pflash: Check return value of blk_pwrite()
commit1857b9db49770590483be44eb90993c42b2a5a99
authorMansour Ahmadi <mansourweb@gmail.com>
Wed, 8 Apr 2020 00:35:52 +0000 (7 20:35 -0400)
committerPhilippe Mathieu-Daudé <philmd@redhat.com>
Fri, 22 May 2020 17:38:14 +0000 (22 19:38 +0200)
tree1e77c795ede2ece8b7dc4e65a045d73eac2c186f
parent3072182dc177886edabbdc548b4640bb32d82269
hw/block/pflash: Check return value of blk_pwrite()

When updating the PFLASH file contents, we should check for a
possible failure of blk_pwrite(). Similar to commit 3a688294e.

Reported-by: Coverity (CID 1357678 CHECKED_RETURN)
Signed-off-by: Mansour Ahmadi <mansourweb@gmail.com>
Message-Id: <20200408003552.58095-1-mansourweb@gmail.com>
[PMD: Add missing "qemu/error-report.h" include and TODO comment]
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
hw/block/pflash_cfi01.c
hw/block/pflash_cfi02.c