[PATCH 01/25] USB: Whiteheat: fix firmware spurious errors

From: Chris Wright
Date: Tue Jun 27 2006 - 16:09:36 EST


-stable review patch. If anyone has any objections, please let us know.
------------------

From: <stuartm@xxxxxxxxxxxxxxx>

Attached patch fixes spurious errors during firmware load.

Signed-off-by: Stuart MacDonald <stuartm@xxxxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>
Signed-off-by: Chris Wright <chrisw@xxxxxxxxxxxx>

---
drivers/usb/serial/whiteheat.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

--- linux-2.6.17.1.orig/drivers/usb/serial/whiteheat.c
+++ linux-2.6.17.1/drivers/usb/serial/whiteheat.c
@@ -388,7 +388,7 @@ static int whiteheat_attach (struct usb_
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_
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]) {

--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/