diff options
author | imp <imp@FreeBSD.org> | 2006-04-06 04:32:29 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2006-04-06 04:32:29 +0000 |
commit | 8694646e12362cd4a91d044f6e8061aa8d0573a6 (patch) | |
tree | b7da986bf3a479c4d4c3e6d9c7e7fe1f2f602556 | |
parent | 000b33975fdda376e2248023d10bd0bfab55b5f8 (diff) | |
download | FreeBSD-src-8694646e12362cd4a91d044f6e8061aa8d0573a6.zip FreeBSD-src-8694646e12362cd4a91d044f6e8061aa8d0573a6.tar.gz |
Add debug writes in error cases that, in theory, should never happen
-rw-r--r-- | sys/arm/at91/at91.c | 7 |
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); |