Khoa Hoang has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/67714 )
Change subject: stlinkv3_spi.c: Fix 'stlinkv3_handle' may be used uninitialized ......................................................................
stlinkv3_spi.c: Fix 'stlinkv3_handle' may be used uninitialized
This change fix stlinkv3_handle may be used uninitialized compiler error. Set stlinkv3_handle initial value to NULL.
Change-Id: Id80eaa2e27902351b40bea3fb66eb368680f4ff4 Signed-off-by: Khoa Hoang admin@khoahoang.com --- M stlinkv3_spi.c 1 file changed, 14 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/14/67714/1
diff --git a/stlinkv3_spi.c b/stlinkv3_spi.c index 38fe9f9..8dc0cb3 100644 --- a/stlinkv3_spi.c +++ b/stlinkv3_spi.c @@ -482,7 +482,7 @@ int ret = 1; int devIndex = 0; struct libusb_context *usb_ctx; - libusb_device_handle *stlinkv3_handle; + libusb_device_handle *stlinkv3_handle = NULL; struct stlinkv3_spi_data *stlinkv3_data;
if (libusb_init(&usb_ctx)) {