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

staging: wilc1000: remove goto from linux_wlan_firmware_download

This patch remove goto feature from linux_wlan_firmware_download function.
Goto feature is return result.
So, remove goto functions and it was replaced with the return value directly.
Signed-off-by: default avatarLeo Kim <leo.kim@atmel.com>
Signed-off-by: default avatarGlen Lee <glen.lee@atmel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0aeea1ad
...@@ -553,14 +553,13 @@ static int linux_wlan_firmware_download(struct net_device *dev) ...@@ -553,14 +553,13 @@ static int linux_wlan_firmware_download(struct net_device *dev)
if (!wilc->firmware) { if (!wilc->firmware) {
PRINT_ER("Firmware buffer is NULL\n"); PRINT_ER("Firmware buffer is NULL\n");
ret = -ENOBUFS; return -ENOBUFS;
goto _FAIL_;
} }
PRINT_D(INIT_DBG, "Downloading Firmware ...\n"); PRINT_D(INIT_DBG, "Downloading Firmware ...\n");
ret = wilc_wlan_firmware_download(wilc->firmware->data, ret = wilc_wlan_firmware_download(wilc->firmware->data,
wilc->firmware->size); wilc->firmware->size);
if (ret < 0) if (ret < 0)
goto _FAIL_; return ret;
PRINT_D(INIT_DBG, "Freeing FW buffer ...\n"); PRINT_D(INIT_DBG, "Freeing FW buffer ...\n");
PRINT_D(INIT_DBG, "Releasing firmware\n"); PRINT_D(INIT_DBG, "Releasing firmware\n");
...@@ -568,8 +567,7 @@ static int linux_wlan_firmware_download(struct net_device *dev) ...@@ -568,8 +567,7 @@ static int linux_wlan_firmware_download(struct net_device *dev)
PRINT_D(INIT_DBG, "Download Succeeded\n"); PRINT_D(INIT_DBG, "Download Succeeded\n");
_FAIL_: return 0;
return ret;
} }
static int linux_wlan_init_test_config(struct net_device *dev, struct wilc *p_nic) static int linux_wlan_init_test_config(struct net_device *dev, struct wilc *p_nic)
......
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