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