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

Chris Wright
2006-06-27T20:10:55Z

[-- Attachment #1: usb-whiteheat-fix-firmware-spurious-errors.patch --]
[-- Type: text/plain, Size: 1280 bytes --]

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

From: <stuartm@connecttech.com>

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 | 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]) {

--