From 4f441486e59e6e8ca5759c3fef33eb5920cb199f Mon Sep 17 00:00:00 2001 From: Paul Fertser Date: Mon, 19 Jan 2015 12:05:04 +0300 Subject: [PATCH] jtag/drivers: remove useless checks causing build failure with clang 3.5.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Icafab6ac1e3e79c6da1bc163c30744eee4bde8d3 Signed-off-by: Paul Fertser Reviewed-on: http://openocd.zylin.com/2482 Tested-by: jenkins Reviewed-by: Andreas Fritiofson Reviewed-by: Andreas Färber --- src/jtag/drivers/ulink.c | 3 --- src/jtag/drivers/usb_blaster/ublast2_access_libusb.c | 3 --- 2 files changed, 6 deletions(-) diff --git a/src/jtag/drivers/ulink.c b/src/jtag/drivers/ulink.c index 8c2b9db12..cfd693a60 100644 --- a/src/jtag/drivers/ulink.c +++ b/src/jtag/drivers/ulink.c @@ -461,9 +461,6 @@ int ulink_write_firmware_section(struct ulink *device, LOG_DEBUG("section %02i at addr 0x%04x (size 0x%04x)", section_index, addr, size); - if (data == NULL) - return ERROR_FAIL; - /* Copy section contents to local buffer */ ret = image_read_section(firmware_image, section_index, 0, size, data, &size_read); diff --git a/src/jtag/drivers/usb_blaster/ublast2_access_libusb.c b/src/jtag/drivers/usb_blaster/ublast2_access_libusb.c index 70dab20d5..ac863918c 100644 --- a/src/jtag/drivers/usb_blaster/ublast2_access_libusb.c +++ b/src/jtag/drivers/usb_blaster/ublast2_access_libusb.c @@ -74,9 +74,6 @@ static int ublast2_write_firmware_section(struct jtag_libusb_device_handle *libu LOG_DEBUG("section %02i at addr 0x%04x (size 0x%04x)", section_index, addr, size); - if (data == NULL) - return ERROR_FAIL; - /* Copy section contents to local buffer */ int ret = image_read_section(firmware_image, section_index, 0, size, data, &size_read);