Commit 7bb6313d authored by Tobin C. Harding's avatar Tobin C. Harding Committed by Greg Kroah-Hartman

staging: ks7010: fix off by one error

Bug introduced in commit 7676b724 by Tobin C. Harding.

Remove equals sign from comparison, fixing off by one error.

Fixes: 7676b724 ("staging: ks7010: move comparison to right hand side")
Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarTobin C. Harding <me@tobin.cc>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 53044529
...@@ -2044,7 +2044,7 @@ static int ks_wlan_set_pmksa(struct net_device *dev, ...@@ -2044,7 +2044,7 @@ static int ks_wlan_set_pmksa(struct net_device *dev,
if (ptr != &priv->pmklist.head) /* not find address. */ if (ptr != &priv->pmklist.head) /* not find address. */
break; /* case */ break; /* case */
if (priv->pmklist.size <= PMK_LIST_MAX) { /* new cache data */ if (priv->pmklist.size < PMK_LIST_MAX) { /* new cache data */
for (i = 0; i < PMK_LIST_MAX; i++) { for (i = 0; i < PMK_LIST_MAX; i++) {
pmk = &priv->pmklist.pmk[i]; pmk = &priv->pmklist.pmk[i];
if (!memcmp("\x00\x00\x00\x00\x00\x00", if (!memcmp("\x00\x00\x00\x00\x00\x00",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment