From 35fe949cd8cc15b33365ce5389ff699a76a2a97f Mon Sep 17 00:00:00 2001 From: Dean Lee Date: Sun, 31 Jan 2021 06:59:49 +0800 Subject: [PATCH] fix panda: remove uninitialized err and check after (#19974) old-commit-hash: edc2b3f67c561f1a44195a7a07e631a30e4d7747 --- selfdrive/boardd/panda.cc | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/selfdrive/boardd/panda.cc b/selfdrive/boardd/panda.cc index 8f9525fb61..4d01c6a954 100644 --- a/selfdrive/boardd/panda.cc +++ b/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