Commit ccb4d02f authored by Ajay Singh's avatar Ajay Singh Committed by Greg Kroah-Hartman

staging: wilc1000: modified NULL check used for 'if' condition in delete_key()

Fix below issue reported by checkpatch.pl script.

'Comparison to NULL could be written "priv->wilc_gtk[key_index]"'
'Comparison to NULL could be written "priv->wilc_ptk[key_index]"'
Signed-off-by: default avatarAjay Singh <ajay.kathat@microchip.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e83d2fac
...@@ -1038,7 +1038,7 @@ static int del_key(struct wiphy *wiphy, struct net_device *netdev, ...@@ -1038,7 +1038,7 @@ static int del_key(struct wiphy *wiphy, struct net_device *netdev,
wl = vif->wilc; wl = vif->wilc;
if (netdev == wl->vif[0]->ndev) { if (netdev == wl->vif[0]->ndev) {
if (priv->wilc_gtk[key_index] != NULL) { if (priv->wilc_gtk[key_index]) {
kfree(priv->wilc_gtk[key_index]->key); kfree(priv->wilc_gtk[key_index]->key);
priv->wilc_gtk[key_index]->key = NULL; priv->wilc_gtk[key_index]->key = NULL;
kfree(priv->wilc_gtk[key_index]->seq); kfree(priv->wilc_gtk[key_index]->seq);
...@@ -1048,7 +1048,7 @@ static int del_key(struct wiphy *wiphy, struct net_device *netdev, ...@@ -1048,7 +1048,7 @@ static int del_key(struct wiphy *wiphy, struct net_device *netdev,
priv->wilc_gtk[key_index] = NULL; priv->wilc_gtk[key_index] = NULL;
} }
if (priv->wilc_ptk[key_index] != NULL) { if (priv->wilc_ptk[key_index]) {
kfree(priv->wilc_ptk[key_index]->key); kfree(priv->wilc_ptk[key_index]->key);
priv->wilc_ptk[key_index]->key = NULL; priv->wilc_ptk[key_index]->key = NULL;
kfree(priv->wilc_ptk[key_index]->seq); kfree(priv->wilc_ptk[key_index]->seq);
......
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