hw/pl011.c: Avoid crash on read when no chr backend present
Add a missing guard that meant we would segfault if the guest read UARTDR on a PL011 serial device which had no chr backend connected. (This didn't happen for Linux guests because Linux reads the flags register and doesn't try to read the UART if it's empty.) Reported-by: NChristian Müller <christian.mueller@heig-vd.ch> Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
Showing
想要评论请 注册 或 登录