diff options
author | Adam Lee <adam8157@gmail.com> | 2013-11-25 15:07:36 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-11-25 12:41:43 -0800 |
commit | 8a76714dd3755536a28f0d0b9c5fc378c492da40 (patch) | |
tree | 9952c024137c016ad6dc7b96612014ed7bf6c762 /drivers | |
parent | 0b71fe36c5fc6546ee6cd60bce2ba78a94f96353 (diff) | |
download | linux-stable-8a76714dd3755536a28f0d0b9c5fc378c492da40.tar.gz linux-stable-8a76714dd3755536a28f0d0b9c5fc378c492da40.tar.bz2 linux-stable-8a76714dd3755536a28f0d0b9c5fc378c492da40.zip |
staging: ft1000: fix uninitialized return variable in request_code_segment
The return variable of request_code_segment() is used uninitialized if
the argument boot_case is false, this patch fixes it.
FYI, in ft1000_usb.h: STATUS_SUCCESS 0, and STATUS_FAILURE 0x1001.
Signed-off-by: Adam Lee <adam8157@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/ft1000/ft1000-usb/ft1000_download.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_download.c b/drivers/staging/ft1000/ft1000-usb/ft1000_download.c index 3c2b085e7990..2c216a56891a 100644 --- a/drivers/staging/ft1000/ft1000-usb/ft1000_download.c +++ b/drivers/staging/ft1000/ft1000-usb/ft1000_download.c @@ -601,11 +601,11 @@ static int request_code_segment(struct ft1000_usb *ft1000dev, u16 **s_file, status = write_blk(ft1000dev, s_file, c_file, word_length); /*DEBUG("write_blk returned %d\n", status); */ } else { - write_blk_fifo(ft1000dev, s_file, c_file, word_length); + status = write_blk_fifo(ft1000dev, s_file, c_file, word_length); if (ft1000dev->usbboot == 0) ft1000dev->usbboot++; if (ft1000dev->usbboot == 1) - ft1000_write_dpram16(ft1000dev, + status |= ft1000_write_dpram16(ft1000dev, DWNLD_MAG1_PS_HDR_LOC, 0, 0); } return status; |