staging: wilc1000: remove pstrWFIDrv in host_int_set_mac_chnl_num
authorChaehyun Lim <chaehyun.lim@gmail.com>
Mon, 5 Oct 2015 02:07:21 +0000 (11:07 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 8 Oct 2015 09:52:45 +0000 (10:52 +0100)
This patch removes pstrWFIDrv variable in host_int_set_mac_chnl_num
function. There is no need to make another variable to check if first
arugment is NULL or not.
It is able to use wfi_drv directly that is first argument of
this function.

Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wilc1000/host_interface.c

index 39d72acf53758eead695a32895cc6b9fb70e57cf..47ccaa81b660a3ba456ba1b4c64fa72441aedbe8 100644 (file)
@@ -5318,10 +5318,9 @@ s32 host_int_get_rx_power_level(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8RxPowerLevel,
 int host_int_set_mac_chnl_num(tstrWILC_WFIDrv *wfi_drv, u8 channel)
 {
        int result = 0;
-       tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)wfi_drv;
        struct host_if_msg msg;
 
-       if (!pstrWFIDrv) {
+       if (!wfi_drv) {
                PRINT_ER("driver is null\n");
                return -EFAULT;
        }