On 12 February 2014 03:37, Peter Crosthwaite <peter.crosthwa...@xilinx.com> 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 <peter.crosthwa...@xilinx.com>
Reviewed-by: Peter Maydell <peter.mayd...@linaro.org> 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