hw/timer/sse-timer: Propagate eventual error in sse_timer_realize()
PATCH 1/1 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é <[email protected]>
--- hw/timer/sse-timer.c | 1 + 1 file changed, 1 insertion(+)
hw/timer/sse-timer.c +1 -0
@@ -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;
Signature · 1 line
2.26.2
Peter Maydell
AppliedQuoted 10 lines · Philippe Mathieu-Daudé
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é <[email protected]>--- hw/timer/sse-timer.c | 1 + 1 file changed, 1 insertion(+)
Applied to target-arm.next, thanks.
-- PMM