summaryrefslogtreecommitdiffstats
path: root/kernel/drivers/nfc/mei_phy.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/drivers/nfc/mei_phy.c')
-rw-r--r--kernel/drivers/nfc/mei_phy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/drivers/nfc/mei_phy.c b/kernel/drivers/nfc/mei_phy.c
index 83deda4bb..6f9563a96 100644
--- a/kernel/drivers/nfc/mei_phy.c
+++ b/kernel/drivers/nfc/mei_phy.c
@@ -133,7 +133,7 @@ static int mei_nfc_if_version(struct nfc_mei_phy *phy)
return -ENOMEM;
bytes_recv = mei_cldev_recv(phy->cldev, (u8 *)reply, if_version_length);
- if (bytes_recv < 0 || bytes_recv < sizeof(struct mei_nfc_reply)) {
+ if (bytes_recv < 0 || bytes_recv < if_version_length) {
pr_err("Could not read IF version\n");
r = -EIO;
goto err;