summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/arm/at91/at91.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/arm/at91/at91.c b/sys/arm/at91/at91.c
index 0027ef0..e9b99e7 100644
--- a/sys/arm/at91/at91.c
+++ b/sys/arm/at91/at91.c
@@ -201,11 +201,14 @@ at91_add_child(device_t dev, int prio, const char *name, int unit,
struct at91_ivar *ivar;
kid = device_add_child_ordered(dev, prio, name, unit);
- if (kid == NULL)
- return;
+ if (kid == NULL) {
+ printf("Can't add child %s%d ordered\n", name, unit);
+ return;
+ }
ivar = malloc(sizeof(*ivar), M_DEVBUF, M_WAITOK | M_ZERO);
if (ivar == NULL) {
device_delete_child(dev, kid);
+ printf("Can't add alloc ivar\n");
return;
}
device_set_ivars(kid, ivar);
OpenPOWER on IntegriCloud