On 30 March 2016 at 11:09, xiaoqiang zhao <zxq_yx_...@163.com> wrote: > * Split the old SysBus init into an instance_init and a > DeviceClass::realize function > * Drop the old SysBus init function and use instance_init > > Signed-off-by: xiaoqiang zhao <zxq_yx_...@163.com> > +static void omap_intc_realize(DeviceState *dev, Error **errp) > +{ > + struct omap_intr_handler_s *s = OMAP_INTC(dev); > + > + if (!s->iclk) { > + error_report("omap-intc: clk not connected"); > + }
In a realize function we have an Error**, so we should use error_setg() to return this error, rather than calling error_report(). > +static void omap2_intc_realize(DeviceState *dev, Error **errp) > +{ > + struct omap_intr_handler_s *s = OMAP_INTC(dev); > + > + if (!s->iclk) { > + error_report("omap2-intc: iclk not connected"); > + return; > + } > + if (!s->fclk) { > + error_report("omap2-intc: fclk not connected"); > + return; > + } > } Similarly here. thanks -- PMM