Hi

On Tue, May 5, 2026 at 6:44 PM Peter Maydell <[email protected]> wrote:
>
> On Mon, 4 May 2026 at 12:38, Marc-André Lureau
> <[email protected]> wrote:
> >
> > The type-checking macros (XLNX_DPDMA(val)) which crash on NULL.
> >
> > Signed-off-by: Marc-André Lureau <[email protected]>
> > ---
> >  hw/display/xlnx_dp.c | 6 ++++++
> >  1 file changed, 6 insertions(+)
> >
> > diff --git a/hw/display/xlnx_dp.c b/hw/display/xlnx_dp.c
> > index 50e6ef10984..876cb3d6642 100644
> > --- a/hw/display/xlnx_dp.c
> > +++ b/hw/display/xlnx_dp.c
> > @@ -570,6 +570,12 @@ static void xlnx_dp_set_dpdma(const Object *obj, const 
> > char *name, Object *val,
> >                                Error **errp)
> >  {
> >      XlnxDPState *s = XLNX_DP(obj);
> > +
> > +    if (!val) {
> > +        error_setg(errp, "%s cannot be set to NULL", name);
> > +        return;
> > +    }
> > +
> >      if (s->console) {
> >          DisplaySurface *surface = qemu_console_surface(s->console);
> >          XlnxDPDMAState *dma = XLNX_DPDMA(val);
>
> What fails here? XLNX_DPDMA(val) should handle NULL, as mentioned
> on the other patch. And xlnx_dpdma_set_host_data_location() checks
> for a NULL argument.
>

Right, it doesn't crash. I did it mechanically because you reported it
as one of the custom add_link setters.
I'll drop it.

Thanks

Reply via email to