devusb: check for nil hp->dump and hp->seprintep

This commit is contained in:
cinap_lenrek 2015-02-20 18:56:22 +01:00
parent c6069e28ac
commit 6f1787adcb

View file

@ -421,15 +421,17 @@ dumpeps(void)
s = seprint(s, e, "ep%d.%d ", ep->dev->nb, ep->nb); s = seprint(s, e, "ep%d.%d ", ep->dev->nb, ep->nb);
seprintep(s, e, ep, 1); seprintep(s, e, ep, 1);
print("%s", buf); print("%s", buf);
if(ep->hp->seprintep != nil){
ep->hp->seprintep(buf, e, ep); ep->hp->seprintep(buf, e, ep);
print("%s", buf); print("%s", buf);
}
poperror(); poperror();
putep(ep); putep(ep);
} }
} }
print("usb dump hcis:\n"); print("usb dump hcis:\n");
for(i = 0; i < Nhcis; i++) for(i = 0; i < Nhcis; i++)
if(hcis[i] != nil) if(hcis[i] != nil && hcis[i]->dump != nil)
hcis[i]->dump(hcis[i]); hcis[i]->dump(hcis[i]);
} }