summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStuart MacDonald <stuartm@connecttech.com>2006-05-31 13:28:40 -0400
committerChris Wright <chrisw@sous-sol.org>2006-06-22 12:16:11 -0700
commit0d9a5318df1248e63a7a528b7a8a8f23b52ac1a4 (patch)
treeb9276475b5e522fae656f58a37279ab417a19352
parent4ece57945f296ab05a8a958089c9a382cbb700b4 (diff)
[PATCH] USB: Whiteheat: fix firmware spurious errors
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>
-rw-r--r--drivers/usb/serial/whiteheat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/serial/whiteheat.c b/drivers/usb/serial/whiteheat.c
index 557411c6e7c7..f494b67a8111 100644
--- a/drivers/usb/serial/whiteheat.c
+++ b/drivers/usb/serial/whiteheat.c
@@ -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]) {