From stuartm@connecttech.com Wed May 31 10:40:58 2006 From: "Stuart MacDonald" To: Subject: USB: Whiteheat: fix firmware spurious errors Date: Wed, 31 May 2006 13:28:40 -0400 Message-ID: <02d901c684d7$a87b8460$294b82ce@stuartm> Attached patch fixes spurious errors during firmware load. Signed-off-by: Stuart MacDonald Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/whiteheat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- gregkh-2.6.orig/drivers/usb/serial/whiteheat.c +++ gregkh-2.6/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]) {