diff options
| author | Chaehyun Lim <chaehyun.lim@gmail.com> | 2015-10-05 05:07:22 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-10-08 12:52:45 +0300 |
| commit | 792fb25b1be8a61f623438abe40efcdbcb9597a3 (patch) | |
| tree | 898689b63a988ea6f554d77118b14b12beab7330 | |
| parent | 157da215b5312017889dc856e770c422db336aac (diff) | |
| download | linux-792fb25b1be8a61f623438abe40efcdbcb9597a3.tar.xz | |
staging: wilc1000: return error code directly in host_int_set_mac_chnl_num
There is no need to pass the error code to the variable 'result'.
Just return the error directly when error occurs.
Return 0 at the end of this function when error is not happened.
Suggested-by: Julian Calaby <julian.calaby@gmail.com>
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| -rw-r--r-- | drivers/staging/wilc1000/host_interface.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 47ccaa81b660..b1aa7dd701f7 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -5317,7 +5317,7 @@ 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; + int result; struct host_if_msg msg; if (!wfi_drv) { @@ -5334,10 +5334,10 @@ int host_int_set_mac_chnl_num(tstrWILC_WFIDrv *wfi_drv, u8 channel) result = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg)); if (result) { PRINT_ER("wilc mq send fail\n"); - result = -EINVAL; + return -EINVAL; } - return result; + return 0; } |
