aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
diff options
context:
space:
mode:
authorAjay Singh <ajay.kathat@microchip.com>2018-05-02 12:43:29 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-05-03 13:56:34 -0700
commitccb4d02f8efb60a894ef67593483dae51ac8b8e7 (patch)
tree06adf9df190e5b20d858164e52f6b7867ca56266 /drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
parentstaging: wilc1000: remove unnecessary 'out of memory' message in handle_key() (diff)
downloadlinux-dev-ccb4d02f8efb60a894ef67593483dae51ac8b8e7.tar.xz
linux-dev-ccb4d02f8efb60a894ef67593483dae51ac8b8e7.zip
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: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wilc1000/wilc_wfi_cfgoperations.c')
-rw-r--r--drivers/staging/wilc1000/wilc_wfi_cfgoperations.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index d6401a04fe3f..25364d3547df 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -1038,7 +1038,7 @@ static int del_key(struct wiphy *wiphy, struct net_device *netdev,
wl = vif->wilc;
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);
priv->wilc_gtk[key_index]->key = NULL;
kfree(priv->wilc_gtk[key_index]->seq);
@@ -1048,7 +1048,7 @@ static int del_key(struct wiphy *wiphy, struct net_device *netdev,
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);
priv->wilc_ptk[key_index]->key = NULL;
kfree(priv->wilc_ptk[key_index]->seq);