From: Leo Kim Date: Tue, 15 Mar 2016 09:48:13 +0000 (+0900) Subject: staging: wilc1000: removes goto definitions from wilc_wlan_firmware_download X-Git-Tag: v4.7-rc1~90^2~775 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5c6021da1c3c46f3c2727626b4a3b9c96bf688ec;p=platform%2Fkernel%2Flinux-exynos.git 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c index ca9054a..ea671a9 100644 --- a/drivers/staging/wilc1000/wilc_wlan.c +++ b/drivers/staging/wilc1000/wilc_wlan.c @@ -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 @@ _fail_: kfree(dma_buffer); -_fail_1: - return (ret < 0) ? ret : 0; }