@@ -12,6 +12,7 @@
*/
#include "qemu/osdep.h"
+#include "qemu/error-report.h"
#include "hw/qdev-clock.h"
#include "hw/qdev-core.h"
#include "qapi/error.h"
@@ -153,6 +154,11 @@ Clock *qdev_get_clock_in(DeviceState *dev, const char *name)
assert(name);
ncl = qdev_get_clocklist(dev, name);
+ if (!ncl) {
+ error_report("can not find clock-in '%s' for device type '%s'",
+ name, object_get_typename(OBJECT(dev)));
+ abort();
+ }
assert(!ncl->output);
return ncl->clock;
@@ -165,6 +171,11 @@ Clock *qdev_get_clock_out(DeviceState *dev, const char *name)
assert(name);
ncl = qdev_get_clocklist(dev, name);
+ if (!ncl) {
+ error_report("can not find clock-out '%s' for device type '%s'",
+ name, object_get_typename(OBJECT(dev)));
+ abort();
+ }
assert(ncl->output);
return ncl->clock;