staging: wilc1000: change if with else if
authorLeo Kim <leo.kim@atmel.com>
Wed, 25 Nov 2015 02:59:48 +0000 (11:59 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 18 Dec 2015 22:40:57 +0000 (14:40 -0800)
The if statement should be else if since it is part of whole if condition.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wilc1000/host_interface.c

index e6c4ce5b317888ee85b77237dbeaf253d9c0a3a6..2408858c8a4c1c6bd2f07e487310310f7d9c876c 100644 (file)
@@ -1764,9 +1764,7 @@ static int Handle_Key(struct host_if_drv *hif_drv,
                                                strWIDList, 4,
                                                get_id_from_handler(hif_drv));
                        kfree(pu8keybuf);
-               }
-
-               if (pstrHostIFkeyAttr->action & ADDKEY) {
+               } else if (pstrHostIFkeyAttr->action & ADDKEY) {
                        PRINT_D(HOSTINF_DBG, "Handling WEP key\n");
                        pu8keybuf = kmalloc(pstrHostIFkeyAttr->attr.wep.key_len + 2, GFP_KERNEL);
                        if (!pu8keybuf) {
@@ -1848,9 +1846,7 @@ static int Handle_Key(struct host_if_drv *hif_drv,
 
                        kfree(pu8keybuf);
                        up(&hif_drv->sem_test_key_block);
-               }
-
-               if (pstrHostIFkeyAttr->action & ADDKEY) {
+               } else if (pstrHostIFkeyAttr->action & ADDKEY) {
                        PRINT_D(HOSTINF_DBG, "Handling group key(Rx) function\n");
 
                        pu8keybuf = kzalloc(RX_MIC_KEY_MSG_LEN, GFP_KERNEL);
@@ -1921,8 +1917,7 @@ _WPARxGtk_end_case_:
                                                get_id_from_handler(hif_drv));
                        kfree(pu8keybuf);
                        up(&hif_drv->sem_test_key_block);
-               }
-               if (pstrHostIFkeyAttr->action & ADDKEY) {
+               } else if (pstrHostIFkeyAttr->action & ADDKEY) {
                        pu8keybuf = kmalloc(PTK_KEY_MSG_LEN, GFP_KERNEL);
                        if (!pu8keybuf) {
                                PRINT_ER("No buffer to send PTK Key\n");