ref: 6f1787adcb00e8b5d320561b232810a94932b8eb
parent: c6069e28ac0e5a66000f0a887367d7c68410e253
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Fri Feb 20 13:56:22 EST 2015
devusb: check for nil hp->dump and hp->seprintep
--- a/sys/src/9/port/devusb.c
+++ b/sys/src/9/port/devusb.c
@@ -421,8 +421,10 @@
s = seprint(s, e, "ep%d.%d ", ep->dev->nb, ep->nb);
seprintep(s, e, ep, 1);
print("%s", buf);
- ep->hp->seprintep(buf, e, ep);
- print("%s", buf);
+ if(ep->hp->seprintep != nil){
+ ep->hp->seprintep(buf, e, ep);
+ print("%s", buf);
+ }
poperror();
putep(ep);
}
@@ -429,7 +431,7 @@
}
print("usb dump hcis:\n");
for(i = 0; i < Nhcis; i++)
- if(hcis[i] != nil)
+ if(hcis[i] != nil && hcis[i]->dump != nil)
hcis[i]->dump(hcis[i]);
}