]> Git Repo - qemu.git/commit
i.MX: Fix UART driver to work with unitialized "chardev" device
authorJean-Christophe Dubois <[email protected]>
Thu, 13 Aug 2015 10:26:22 +0000 (11:26 +0100)
committerPeter Maydell <[email protected]>
Thu, 13 Aug 2015 10:26:22 +0000 (11:26 +0100)
commitf7a6785e12d834d05200b0595070db453344b25d
tree07cdae6f448514ba854aa34e5f774b03a00e78b7
parent5dfaa75b4d96fe88858a98d947b97e697e2811e6
i.MX: Fix UART driver to work with unitialized "chardev" device

The "chardev" property initialization might have failed (for example because
there are not enough chardevs provided by QEMU).

The serial device emulator needs to be able to work with an uninitialized
(NULL) chardev device pointer.

This patch adds some missing tests on the chr pointer value before
using it.

Signed-off-by: Jean-Christophe Dubois <[email protected]>
Reviewed-by: Peter Crosthwaite <[email protected]>
Message-id: 1438342461[email protected]
Signed-off-by: Peter Maydell <[email protected]>
hw/char/imx_serial.c
This page took 0.02628 seconds and 4 git commands to generate.