summaryrefslogtreecommitdiffstats
path: root/drivers/usb/storage/sddr09.c
diff options
context:
space:
mode:
authorEmilio López2013-05-12 16:43:22 +0200
committerGreg Kroah-Hartman2013-05-17 02:48:28 +0200
commit4cb4f83826195e37dbaeaa0ba0b0c50110061009 (patch)
tree822c27b1aa9d248ae3bc8fc3c3948a77f6859d84 /drivers/usb/storage/sddr09.c
parentusb: fsl: add missing platform_driver owner (diff)
downloadkernel-qcow2-linux-4cb4f83826195e37dbaeaa0ba0b0c50110061009.tar.gz
kernel-qcow2-linux-4cb4f83826195e37dbaeaa0ba0b0c50110061009.tar.xz
kernel-qcow2-linux-4cb4f83826195e37dbaeaa0ba0b0c50110061009.zip
usb: storage: sddr09: initialize variables directly
Clean up the code a bit to initialize the variables directly when defining them. Signed-off-by: Emilio López <emilio@elopez.com.ar> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/storage/sddr09.c')
-rw-r--r--drivers/usb/storage/sddr09.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/usb/storage/sddr09.c b/drivers/usb/storage/sddr09.c
index 732027f33200..073a2c32ccc4 100644
--- a/drivers/usb/storage/sddr09.c
+++ b/drivers/usb/storage/sddr09.c
@@ -219,11 +219,7 @@ static void nand_init_ecc(void) {
/* compute 3-byte ecc on 256 bytes */
static void nand_compute_ecc(unsigned char *data, unsigned char *ecc) {
int i, j, a;
- unsigned char par, bit, bits[8];
-
- par = 0;
- for (j = 0; j < 8; j++)
- bits[j] = 0;
+ unsigned char par = 0, bit, bits[8] = {0};
/* collect 16 checksum bits */
for (i = 0; i < 256; i++) {