diff options
| -rw-r--r-- | drivers/usb/serial/whiteheat.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/serial/whiteheat.c b/drivers/usb/serial/whiteheat.c index 582860ac8764..5b06fa366098 100644 --- a/drivers/usb/serial/whiteheat.c +++ b/drivers/usb/serial/whiteheat.c | |||
| @@ -388,7 +388,7 @@ static int whiteheat_attach (struct usb_serial *serial) | |||
| 388 | if (ret) { | 388 | if (ret) { |
| 389 | err("%s: Couldn't send command [%d]", serial->type->description, ret); | 389 | err("%s: Couldn't send command [%d]", serial->type->description, ret); |
| 390 | goto no_firmware; | 390 | goto no_firmware; |
| 391 | } else if (alen != sizeof(command)) { | 391 | } else if (alen != 2) { |
| 392 | err("%s: Send command incomplete [%d]", serial->type->description, alen); | 392 | err("%s: Send command incomplete [%d]", serial->type->description, alen); |
| 393 | goto no_firmware; | 393 | goto no_firmware; |
| 394 | } | 394 | } |
| @@ -400,7 +400,7 @@ static int whiteheat_attach (struct usb_serial *serial) | |||
| 400 | if (ret) { | 400 | if (ret) { |
| 401 | err("%s: Couldn't get results [%d]", serial->type->description, ret); | 401 | err("%s: Couldn't get results [%d]", serial->type->description, ret); |
| 402 | goto no_firmware; | 402 | goto no_firmware; |
| 403 | } else if (alen != sizeof(result)) { | 403 | } else if (alen != sizeof(*hw_info) + 1) { |
| 404 | err("%s: Get results incomplete [%d]", serial->type->description, alen); | 404 | err("%s: Get results incomplete [%d]", serial->type->description, alen); |
| 405 | goto no_firmware; | 405 | goto no_firmware; |
| 406 | } else if (result[0] != command[0]) { | 406 | } else if (result[0] != command[0]) { |
