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: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
if (!wilc->firmware) {
PRINT_ER("Firmware buffer is NULL\n");
- ret = -ENOBUFS;
- goto _FAIL_;
+ return -ENOBUFS;
}
PRINT_D(INIT_DBG, "Downloading Firmware ...\n");
ret = wilc_wlan_firmware_download(wilc->firmware->data,
wilc->firmware->size);
if (ret < 0)
- goto _FAIL_;
+ return ret;
PRINT_D(INIT_DBG, "Freeing FW buffer ...\n");
PRINT_D(INIT_DBG, "Releasing firmware\n");
PRINT_D(INIT_DBG, "Download Succeeded\n");
-_FAIL_:
- return ret;
+ return 0;
}
static int linux_wlan_init_test_config(struct net_device *dev, struct wilc *p_nic)