[PATCH] staging: rtl8192u: Modify if, else if conditions to remove unnecessary equality checks. This change was detected with the help of coccinelle tool.

From: Dhere, Chaitanya (C.)
Date: Mon May 18 2015 - 12:33:06 EST


Signed-off-by: Chaitanya Dhere <cvijaydh@xxxxxxxxxxx>
Reply-To:

---
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
index d2e8b12..30b0135 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
@@ -1364,12 +1364,11 @@ static void ieee80211_associate_complete_wq(struct work_struct *work)
ieee->LinkDetectInfo.NumRecvDataInPeriod= 1;
}
ieee->link_change(ieee->dev);
- if(ieee->is_silent_reset == 0){
+ if (!ieee->is_silent_reset) {
printk("============>normal associate\n");
notify_wx_assoc_event(ieee);
}
- else if(ieee->is_silent_reset == 1)
- {
+ else if (ieee->is_silent_reset) {
printk("==================>silent reset associate\n");
ieee->is_silent_reset = false;
}
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/