Fix deref before null check
Check return val of usb config getter
Fix staling main loop if alloc fails in TCP
Check send() return values