Eduardo Habkost <ehabk...@redhat.com> writes: > This patch simplifies code that uses a local_err variable just to > immediately use it for an error_propagate() call. > > Coccinelle patch used to perform the changes added to > scripts/coccinelle/remove_local_err.cocci. > > Reviewed-by: Eric Blake <ebl...@redhat.com> > Acked-by: Cornelia Huck <cornelia.h...@de.ibm.com> > Signed-off-by: Eduardo Habkost <ehabk...@redhat.com> [...] > diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c > index 95ff5e3..b7112d0 100644 > --- a/hw/s390x/s390-virtio-ccw.c > +++ b/hw/s390x/s390-virtio-ccw.c > @@ -180,10 +180,7 @@ static HotplugHandler > *s390_get_hotplug_handler(MachineState *machine, > static void s390_hot_add_cpu(const int64_t id, Error **errp) > { > MachineState *machine = MACHINE(qdev_get_machine()); > - Error *err = NULL; > -
I'd prefer to keep this blank line. Can touch up on commit to error-next. > - s390x_new_cpu(machine->cpu_model, id, &err); > - error_propagate(errp, err); > + s390x_new_cpu(machine->cpu_model, id, errp); > } > [...]