From: Paul Fertser Date: Mon, 19 Jan 2015 09:05:04 +0000 (+0300) Subject: jtag/drivers: remove useless checks causing build failure with clang 3.5.0 X-Git-Tag: v0.9.0-rc1~169 X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=commitdiff_plain;h=4f441486e59e6e8ca5759c3fef33eb5920cb199f;hp=f2c85452cfa71d49b2eedf0cffe8acdd0babbf50 jtag/drivers: remove useless checks causing build failure with clang 3.5.0 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 --- diff --git a/src/jtag/drivers/ulink.c b/src/jtag/drivers/ulink.c index 8c2b9db122..cfd693a60e 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 70dab20d58..ac863918cb 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);