[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 23/39] hw/timer/sse-timer: Propagate eventual error in sse_timer_r
From: |
Peter Maydell |
Subject: |
[PULL 23/39] hw/timer/sse-timer: Propagate eventual error in sse_timer_realize() |
Date: |
Fri, 12 Mar 2021 13:51:24 +0000 |
From: Philippe Mathieu-Daudé <f4bug@amsat.org>
If the SSECounter link is absent, we set an error message
in sse_timer_realize() but forgot to propagate this error.
Add the missing 'return'.
Fixes: CID 1450755 (Null pointer dereferences)
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20210312001845.1562670-1-f4bug@amsat.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
hw/timer/sse-timer.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/timer/sse-timer.c b/hw/timer/sse-timer.c
index 8dbe6ac651e..f959cb9d603 100644
--- a/hw/timer/sse-timer.c
+++ b/hw/timer/sse-timer.c
@@ -415,6 +415,7 @@ static void sse_timer_realize(DeviceState *dev, Error
**errp)
if (!s->counter) {
error_setg(errp, "counter property was not set");
+ return;
}
s->counter_notifier.notify = sse_timer_counter_callback;
--
2.20.1
- [PULL 21/39] tests/acceptance: update sunxi kernel from armbian to 5.10.16, (continued)
- [PULL 21/39] tests/acceptance: update sunxi kernel from armbian to 5.10.16, Peter Maydell, 2021/03/12
- [PULL 14/39] target/arm: Update BRKA, BRKB, BRKN for PREDDESC, Peter Maydell, 2021/03/12
- [PULL 18/39] hw/net/allwinner-sun8i-emac: traverse transmit queue using TX_CUR_DESC register value, Peter Maydell, 2021/03/12
- [PULL 24/39] accel: kvm: Fix kvm_type invocation, Peter Maydell, 2021/03/12
- [PULL 27/39] hw/misc: Add NPCM7XX MFT Module, Peter Maydell, 2021/03/12
- [PULL 29/39] hw/arm: Connect PWM fans in NPCM7XX boards, Peter Maydell, 2021/03/12
- [PULL 35/39] hw/display/pxa2xx_lcd: Remove dest_width state field, Peter Maydell, 2021/03/12
- [PULL 26/39] hw/misc: Add GPIOs for duty in NPCM7xx PWM, Peter Maydell, 2021/03/12
- [PULL 34/39] hw/display/pxa2xx_lcd: Remove dead code for non-32-bpp surfaces, Peter Maydell, 2021/03/12
- [PULL 16/39] target/arm: Update WHILE for PREDDESC, Peter Maydell, 2021/03/12
- [PULL 23/39] hw/timer/sse-timer: Propagate eventual error in sse_timer_realize(),
Peter Maydell <=
- [PULL 12/39] target/arm: Fix sve_punpk_p vs odd vector lengths, Peter Maydell, 2021/03/12
- [PULL 19/39] tests/acceptance/boot_linux_console: remove Armbian 19.11.3 bionic test for orangepi-pc machine, Peter Maydell, 2021/03/12
- [PULL 20/39] tests/acceptance/boot_linux_console: change URL for test_arm_orangepi_bionic_20_08, Peter Maydell, 2021/03/12
- [PULL 10/39] target/arm: Fix sve_uzp_p vs odd vector lengths, Peter Maydell, 2021/03/12
- [PULL 25/39] hw/arm/virt: KVM: The IPA lower bound is 32, Peter Maydell, 2021/03/12
- [PULL 22/39] tests/acceptance: drop ARMBIAN_ARTIFACTS_CACHED condition for orangepi-pc, cubieboard tests, Peter Maydell, 2021/03/12
- [PULL 30/39] tests/qtest: Test PWM fan RPM using MFT in PWM test, Peter Maydell, 2021/03/12
- [PULL 31/39] hw/display/pl110: Remove dead code for non-32-bpp surfaces, Peter Maydell, 2021/03/12
- [PULL 32/39] hw/display/pl110: Pull included-once parts of template header into pl110.c, Peter Maydell, 2021/03/12
- [PULL 28/39] hw/arm: Add MFT device to NPCM7xx Soc, Peter Maydell, 2021/03/12