qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH target-arm v1 2/2] char/cadence_uart: Add NULL g


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH target-arm v1 2/2] char/cadence_uart: Add NULL guards against chr
Date: Wed, 12 Feb 2014 19:24:50 +0000

On 12 February 2014 03:37, Peter Crosthwaite
<address@hidden> wrote:
> It's possible and valid for users of this device model to instantiate
> it without a backing chr device. To avoid crashes, guard all uses of
> the backing chr device against NULL.
>
> Signed-off-by: Peter Crosthwaite <address@hidden>

Reviewed-by: Peter Maydell <address@hidden>

I guess the other way to approach this would be to require the
backing device and just set it up to be a "throw away output,
never provide input" dummy if there isn't a real one. No idea
if that's feasible though so NULL-guards seems reasonable.

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]