diff options
author | Philippe Mathieu-Daudé | 2021-03-12 01:18:45 +0100 |
---|---|---|
committer | Peter Maydell | 2021-03-12 13:43:52 +0100 |
commit | fc49b77fd391fdcfc9c0b61a8c301ac0d15232e9 (patch) | |
tree | b19a3effeb9555a0d344d6515b5a80227e174281 /hw | |
parent | tests/acceptance: drop ARMBIAN_ARTIFACTS_CACHED condition for orangepi-pc, cu... (diff) | |
download | qemu-fc49b77fd391fdcfc9c0b61a8c301ac0d15232e9.tar.gz qemu-fc49b77fd391fdcfc9c0b61a8c301ac0d15232e9.tar.xz qemu-fc49b77fd391fdcfc9c0b61a8c301ac0d15232e9.zip |
hw/timer/sse-timer: Propagate eventual error in sse_timer_realize()
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>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/timer/sse-timer.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/timer/sse-timer.c b/hw/timer/sse-timer.c index 8dbe6ac651..f959cb9d60 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; |