summaryrefslogtreecommitdiffstats
path: root/drivers/usb/storage/alauda.c
diff options
context:
space:
mode:
authorEmilio López <emilio@elopez.com.ar>2013-05-12 16:43:23 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-05-17 02:48:28 +0200
commit6523f6d2475df99e441bd742d2a8993f64124ce9 (patch)
treea5228f9aab3a150e450dc242e1b674135b59592e /drivers/usb/storage/alauda.c
parentusb: storage: sddr09: initialize variables directly (diff)
downloadlinux-6523f6d2475df99e441bd742d2a8993f64124ce9.tar.xz
linux-6523f6d2475df99e441bd742d2a8993f64124ce9.zip
usb: storage: alauda: 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/alauda.c')
-rw-r--r--drivers/usb/storage/alauda.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/usb/storage/alauda.c b/drivers/usb/storage/alauda.c
index 77a2ddfe6487..6636a583da12 100644
--- a/drivers/usb/storage/alauda.c
+++ b/drivers/usb/storage/alauda.c
@@ -249,11 +249,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++) {