提交 09fd6bc8 编写于 作者: S Stuart MacDonald 提交者: Greg Kroah-Hartman

[PATCH] USB: Whiteheat: fix firmware spurious errors

Attached patch fixes spurious errors during firmware load.
Signed-off-by: NStuart MacDonald <stuartm@connecttech.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 069e8a65
......@@ -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]) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册