[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 7/7] ppc/ppc405_boards: Remove unnecessary NULL check
From: |
David Gibson |
Subject: |
[PULL 7/7] ppc/ppc405_boards: Remove unnecessary NULL check |
Date: |
Tue, 24 Mar 2020 16:14:56 +1100 |
From: Philippe Mathieu-Daudé <address@hidden>
This code is inside the "if (dinfo)" condition, so testing
again here whether it is NULL is unnecessary.
Fixes: dd59bcae7 (Don't size flash memory to match backing image)
Reported-by: Coverity (CID 1421917)
Suggested-by: Peter Maydell <address@hidden>
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
hw/ppc/ppc405_boards.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/ppc/ppc405_boards.c b/hw/ppc/ppc405_boards.c
index e6bffb9e1a..6198ec1035 100644
--- a/hw/ppc/ppc405_boards.c
+++ b/hw/ppc/ppc405_boards.c
@@ -191,7 +191,7 @@ static void ref405ep_init(MachineState *machine)
bios_size = 8 * MiB;
pflash_cfi02_register((uint32_t)(-bios_size),
"ef405ep.bios", bios_size,
- dinfo ? blk_by_legacy_dinfo(dinfo) : NULL,
+ blk_by_legacy_dinfo(dinfo),
64 * KiB, 1,
2, 0x0001, 0x22DA, 0x0000, 0x0000, 0x555, 0x2AA,
1);
@@ -459,7 +459,7 @@ static void taihu_405ep_init(MachineState *machine)
bios_size = 2 * MiB;
pflash_cfi02_register(0xFFE00000,
"taihu_405ep.bios", bios_size,
- dinfo ? blk_by_legacy_dinfo(dinfo) : NULL,
+ blk_by_legacy_dinfo(dinfo),
64 * KiB, 1,
4, 0x0001, 0x22DA, 0x0000, 0x0000, 0x555, 0x2AA,
1);
@@ -494,7 +494,7 @@ static void taihu_405ep_init(MachineState *machine)
if (dinfo) {
bios_size = 32 * MiB;
pflash_cfi02_register(0xfc000000, "taihu_405ep.flash", bios_size,
- dinfo ? blk_by_legacy_dinfo(dinfo) : NULL,
+ blk_by_legacy_dinfo(dinfo),
64 * KiB, 1,
4, 0x0001, 0x22DA, 0x0000, 0x0000, 0x555, 0x2AA,
1);
--
2.25.1
- [PULL 0/7] ppc-for-5.0 queue 20200324, David Gibson, 2020/03/24
- [PULL 1/7] ppc/spapr: Set the effective address provided flag in mc error log., David Gibson, 2020/03/24
- [PULL 4/7] target/ppc: don't byte swap ELFv2 signal handler, David Gibson, 2020/03/24
- [PULL 5/7] spapr: Fix memory leak in h_client_architecture_support(), David Gibson, 2020/03/24
- [PULL 2/7] target/ppc: Fix slbia TLB invalidation gap, David Gibson, 2020/03/24
- [PULL 7/7] ppc/ppc405_boards: Remove unnecessary NULL check,
David Gibson <=
- [PULL 3/7] target/ppc: Fix ISA v3.0 (POWER9) slbia implementation, David Gibson, 2020/03/24
- [PULL 6/7] hw/ppc: Take QEMU lock when calling ppc_dcr_read/write(), David Gibson, 2020/03/24
- Re: [PULL 0/7] ppc-for-5.0 queue 20200324, Peter Maydell, 2020/03/24