Commit 77178807 authored by Leo Kim's avatar Leo Kim Committed by Greg Kroah-Hartman

staging: wilc1000: fixes unnecessary variable replacement

This patch removes an unnecessary variable use for the errors and
returns errors directly without a result variable.
Signed-off-by: default avatarLeo Kim <leo.kim@atmel.com>
Signed-off-by: default avatarTony Cho <tony.cho@atmel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9f3295a2
...@@ -3167,9 +3167,8 @@ s32 host_int_add_wep_key_bss_sta(struct host_if_drv *hif_drv, ...@@ -3167,9 +3167,8 @@ s32 host_int_add_wep_key_bss_sta(struct host_if_drv *hif_drv,
struct host_if_msg msg; struct host_if_msg msg;
if (!hif_drv) { if (!hif_drv) {
result = -EFAULT;
PRINT_ER("driver is null\n"); PRINT_ER("driver is null\n");
return result; return -EFAULT;
} }
memset(&msg, 0, sizeof(struct host_if_msg)); memset(&msg, 0, sizeof(struct host_if_msg));
...@@ -3204,9 +3203,8 @@ s32 host_int_add_wep_key_bss_ap(struct host_if_drv *hif_drv, ...@@ -3204,9 +3203,8 @@ s32 host_int_add_wep_key_bss_ap(struct host_if_drv *hif_drv,
u8 i; u8 i;
if (!hif_drv) { if (!hif_drv) {
result = -EFAULT;
PRINT_ER("driver is null\n"); PRINT_ER("driver is null\n");
return result; return -EFAULT;
} }
memset(&msg, 0, sizeof(struct host_if_msg)); memset(&msg, 0, sizeof(struct host_if_msg));
...@@ -3246,9 +3244,8 @@ s32 host_int_add_ptk(struct host_if_drv *hif_drv, const u8 *pu8Ptk, ...@@ -3246,9 +3244,8 @@ s32 host_int_add_ptk(struct host_if_drv *hif_drv, const u8 *pu8Ptk,
u32 i; u32 i;
if (!hif_drv) { if (!hif_drv) {
result = -EFAULT;
PRINT_ER("driver is null\n"); PRINT_ER("driver is null\n");
return result; return -EFAULT;
} }
if (pu8RxMic != NULL) if (pu8RxMic != NULL)
u8KeyLen += RX_MIC_KEY_LEN; u8KeyLen += RX_MIC_KEY_LEN;
...@@ -3311,9 +3308,8 @@ s32 host_int_add_rx_gtk(struct host_if_drv *hif_drv, const u8 *pu8RxGtk, ...@@ -3311,9 +3308,8 @@ s32 host_int_add_rx_gtk(struct host_if_drv *hif_drv, const u8 *pu8RxGtk,
u8 u8KeyLen = u8GtkKeylen; u8 u8KeyLen = u8GtkKeylen;
if (!hif_drv) { if (!hif_drv) {
result = -EFAULT;
PRINT_ER("driver is null\n"); PRINT_ER("driver is null\n");
return result; return -EFAULT;
} }
memset(&msg, 0, sizeof(struct host_if_msg)); memset(&msg, 0, sizeof(struct host_if_msg));
...@@ -3370,9 +3366,8 @@ s32 host_int_set_pmkid_info(struct host_if_drv *hif_drv, struct host_if_pmkid_at ...@@ -3370,9 +3366,8 @@ s32 host_int_set_pmkid_info(struct host_if_drv *hif_drv, struct host_if_pmkid_at
if (!hif_drv) { if (!hif_drv) {
result = -EFAULT;
PRINT_ER("driver is null\n"); PRINT_ER("driver is null\n");
return result; return -EFAULT;
} }
memset(&msg, 0, sizeof(struct host_if_msg)); memset(&msg, 0, sizeof(struct host_if_msg));
...@@ -3514,9 +3509,8 @@ s32 host_int_set_join_req(struct host_if_drv *hif_drv, u8 *pu8bssid, ...@@ -3514,9 +3509,8 @@ s32 host_int_set_join_req(struct host_if_drv *hif_drv, u8 *pu8bssid,
struct host_if_msg msg; struct host_if_msg msg;
if (!hif_drv || pfConnectResult == NULL) { if (!hif_drv || pfConnectResult == NULL) {
result = -EFAULT;
PRINT_ER("Driver is null\n"); PRINT_ER("Driver is null\n");
return result; return -EFAULT;
} }
if (pJoinParams == NULL) { if (pJoinParams == NULL) {
...@@ -3575,16 +3569,12 @@ s32 host_int_flush_join_req(struct host_if_drv *hif_drv) ...@@ -3575,16 +3569,12 @@ s32 host_int_flush_join_req(struct host_if_drv *hif_drv)
s32 result = 0; s32 result = 0;
struct host_if_msg msg; struct host_if_msg msg;
if (!join_req) { if (!join_req)
result = -EFAULT; return -EFAULT;
return result;
}
if (!hif_drv) { if (!hif_drv) {
result = -EFAULT;
PRINT_ER("Driver is null\n"); PRINT_ER("Driver is null\n");
return result; return -EFAULT;
} }
msg.id = HOST_IF_MSG_FLUSH_CONNECT; msg.id = HOST_IF_MSG_FLUSH_CONNECT;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment