Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5c6021da authored by Leo Kim's avatar Leo Kim Committed by Greg Kroah-Hartman
Browse files

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: default avatarLeo Kim <leo.kim@atmel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 90fd4cc5
Loading
Loading
Loading
Loading
+2 −6
Original line number Original line Diff line number Diff line
@@ -946,10 +946,8 @@ int wilc_wlan_firmware_download(struct wilc *wilc, const u8 *buffer,
	blksz = BIT(12);
	blksz = BIT(12);


	dma_buffer = kmalloc(blksz, GFP_KERNEL);
	dma_buffer = kmalloc(blksz, GFP_KERNEL);
	if (!dma_buffer) {
	if (!dma_buffer)
		ret = -EIO;
		return -EIO;
		goto _fail_1;
	}


	offset = 0;
	offset = 0;
	do {
	do {
@@ -987,8 +985,6 @@ int wilc_wlan_firmware_download(struct wilc *wilc, const u8 *buffer,


	kfree(dma_buffer);
	kfree(dma_buffer);


_fail_1:

	return (ret < 0) ? ret : 0;
	return (ret < 0) ? ret : 0;
}
}