mirror of
https://review.coreboot.org/flashrom.git
synced 2025-04-27 07:02:34 +02:00
dediprog: Fix segmentation fault on no device found
libusb_exit() call is done by dediprog_open() under the ret == 1 condition. Removing this line has no impact on any flow and side effect of the program. Change-Id: I38b3f3ee3f9d46845df1404791f4a4782320aa7c Signed-off-by: Medicine Yeh <medicinehy@gmail.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/48688 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Edward O'Callaghan <quasisec@chromium.org> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
855d6b6f11
commit
b76d281010
@ -1188,7 +1188,6 @@ int dediprog_init(void)
|
||||
ret = dediprog_open(i);
|
||||
if (ret == -1) {
|
||||
/* no dev */
|
||||
libusb_exit(usb_ctx);
|
||||
return 1;
|
||||
} else if (ret == -2) {
|
||||
/* busy dev */
|
||||
|
Loading…
x
Reference in New Issue
Block a user