Re: [Qemu-devel] [PATCH] hw/qdev: Don't crash if qdev_create(NULL, ...) fails

2011-08-03 Thread Markus Armbruster
Peter Maydell writes: > If an attempt to create a qdev device on the default sysbus (by passing > NULL as the bus to qdev_create) fails, print a useful error message > rather than crashing trying to dereference a NULL pointer. The special case bus == NULL is ugly, and should be removed. But rej

[Qemu-devel] [PATCH] hw/qdev: Don't crash if qdev_create(NULL, ...) fails

2011-08-03 Thread Peter Maydell
If an attempt to create a qdev device on the default sysbus (by passing NULL as the bus to qdev_create) fails, print a useful error message rather than crashing trying to dereference a NULL pointer. Signed-off-by: Peter Maydell --- hw/qdev.c |7 ++- 1 files changed, 6 insertions(+), 1 de