>>> On 04/20/2018 05:43 AM, Peter Maydell wrote:
>>> Since we can now safely call serial_mm_init(..., chr=NULL, ...), I'll
>>> work on simplifying and fixing this.
>>
>> Correct. There are a bunch of dubious workarounds in the
>> codebase which try to handle the problem at different levels,
>> but we've decided that the right thing is for the NULL pointer
>> to be dealt with in one place at the bottom (in the qemu_chr_fe_*
>> functions).
> 
> OK, I'll happily clean that :)

Hmmm removing the "if (serial_hds[0])" check I reach:

void serial_realize_core(SerialState *s, Error **errp)
{
    if (!qemu_chr_fe_backend_connected(&s->chr)) {
        error_setg(errp, "Can't create serial device, empty char device");
        return;
    }

Reply via email to