fix panda: remove uninitialized err and check after (#19974)

pull/19975/head
Dean Lee 5 years ago committed by GitHub
parent 6d16bfab82
commit edc2b3f67c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      selfdrive/boardd/panda.cc

@ -28,12 +28,8 @@ void panda_set_power(bool power){
}
Panda::Panda(){
int err;
if (err != 0) { goto fail; }
// init libusb
err = libusb_init(&ctx);
int err = libusb_init(&ctx);
if (err != 0) { goto fail; }
#if LIBUSB_API_VERSION >= 0x01000106

Loading…
Cancel
Save