]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
staging: wilc1000: remove static variable 'del_beacon' and null check
authorAjay Singh <ajay.kathat@microchip.com>
Wed, 2 May 2018 07:13:39 +0000 (12:43 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 May 2018 20:56:35 +0000 (13:56 -0700)
Using local variable instead of static varible 'del_beacon'. Also removed
the unnecessary 'if' check in handle_del_beacon().

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wilc1000/host_interface.c

index d5ed484e0b82f49f134a6d18aa5d16a9d00f7351..ff687f6a6834b90f20af2cc79b9543f3b6d623b1 100644 (file)
@@ -246,7 +246,6 @@ static s8 rssi;
 static u8 set_ip[2][4];
 static u8 get_ip[2][4];
 static u32 inactive_time;
-static u8 del_beacon;
 static u32 clients_count;
 
 #define REAL_JOIN_REQ 0
@@ -2019,15 +2018,13 @@ static void handle_del_beacon(struct wilc_vif *vif)
        s32 result = 0;
        struct wid wid;
        u8 *cur_byte;
+       u8 del_beacon = 0;
 
        wid.id = (u16)WID_DEL_BEACON;
        wid.type = WID_CHAR;
        wid.size = sizeof(char);
        wid.val = &del_beacon;
 
-       if (!wid.val)
-               return;
-
        cur_byte = wid.val;
 
        result = wilc_send_config_pkt(vif, SET_CFG, &wid, 1,