|
@@ -341,7 +341,7 @@ static int mei_nfc_if_version(struct mei_cl *cl,
|
|
|
|
|
|
ret = 0;
|
|
|
bytes_recv = __mei_cl_recv(cl, (u8 *)reply, if_version_length, 0, 0);
|
|
|
- if (bytes_recv < if_version_length) {
|
|
|
+ if (bytes_recv < 0 || bytes_recv < if_version_length) {
|
|
|
dev_err(bus->dev, "Could not read IF version\n");
|
|
|
ret = -EIO;
|
|
|
goto err;
|