]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[PATCH] USB: Whiteheat: fix firmware spurious errors
authorStuart MacDonald <stuartm@connecttech.com>
Wed, 31 May 2006 17:28:40 +0000 (13:28 -0400)
committerChris Wright <chrisw@sous-sol.org>
Thu, 22 Jun 2006 19:16:11 +0000 (12:16 -0700)
Attached patch fixes spurious errors during firmware load.

Signed-off-by: Stuart MacDonald <stuartm@connecttech.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
drivers/usb/serial/whiteheat.c

index 557411c6e7c7031f60cdbde3ddfb4102cc9e91c3..f494b67a8111a6e0cf9d990f18f271411f072342 100644 (file)
@@ -388,7 +388,7 @@ static int whiteheat_attach (struct usb_serial *serial)
        if (ret) {
                err("%s: Couldn't send command [%d]", serial->type->description, ret);
                goto no_firmware;
-       } else if (alen != sizeof(command)) {
+       } else if (alen != 2) {
                err("%s: Send command incomplete [%d]", serial->type->description, alen);
                goto no_firmware;
        }
@@ -400,7 +400,7 @@ static int whiteheat_attach (struct usb_serial *serial)
        if (ret) {
                err("%s: Couldn't get results [%d]", serial->type->description, ret);
                goto no_firmware;
-       } else if (alen != sizeof(result)) {
+       } else if (alen != sizeof(*hw_info) + 1) {
                err("%s: Get results incomplete [%d]", serial->type->description, alen);
                goto no_firmware;
        } else if (result[0] != command[0]) {