staging: wilc1000: removes goto definitions from wilc_wlan_firmware_download

This patch removes goto definitions from wilc_wlan_firmware_download function.
Goto '_fail_1' feature is error return.
It returns error type directly without result variable replacement as well.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Leo Kim 2016-03-15 18:48:13 +09:00 committed by Greg Kroah-Hartman
parent 90fd4cc5d2
commit 5c6021da1c
1 changed files with 2 additions and 6 deletions

View File

@ -946,10 +946,8 @@ int wilc_wlan_firmware_download(struct wilc *wilc, const u8 *buffer,
blksz = BIT(12);
dma_buffer = kmalloc(blksz, GFP_KERNEL);
if (!dma_buffer) {
ret = -EIO;
goto _fail_1;
}
if (!dma_buffer)
return -EIO;
offset = 0;
do {
@ -987,8 +985,6 @@ int wilc_wlan_firmware_download(struct wilc *wilc, const u8 *buffer,
kfree(dma_buffer);
_fail_1:
return (ret < 0) ? ret : 0;
}