[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>
This commit is contained in:
Stuart MacDonald 2006-05-31 13:28:40 -04:00 коммит произвёл Greg Kroah-Hartman
Родитель 069e8a65cd
Коммит 09fd6bc8b4
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -388,7 +388,7 @@ static int whiteheat_attach (struct usb_serial *serial)
if (ret) { if (ret) {
err("%s: Couldn't send command [%d]", serial->type->description, ret); err("%s: Couldn't send command [%d]", serial->type->description, ret);
goto no_firmware; goto no_firmware;
} else if (alen != sizeof(command)) { } else if (alen != 2) {
err("%s: Send command incomplete [%d]", serial->type->description, alen); err("%s: Send command incomplete [%d]", serial->type->description, alen);
goto no_firmware; goto no_firmware;
} }
@ -400,7 +400,7 @@ static int whiteheat_attach (struct usb_serial *serial)
if (ret) { if (ret) {
err("%s: Couldn't get results [%d]", serial->type->description, ret); err("%s: Couldn't get results [%d]", serial->type->description, ret);
goto no_firmware; 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); err("%s: Get results incomplete [%d]", serial->type->description, alen);
goto no_firmware; goto no_firmware;
} else if (result[0] != command[0]) { } else if (result[0] != command[0]) {