]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
staging: ks7010: fix memory leak
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>
Sun, 4 Sep 2016 15:00:19 +0000 (20:30 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 12 Sep 2016 09:01:52 +0000 (11:01 +0200)
If the firmware request failed we were just returning but we missed
freeing the memory and releasing the MMC Host.

Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/ks7010/ks7010_sdio.c

index 7bcf1ea618617154a7f0a6577cb37ecec6ea4826..86cdebe47db65de3a0c2d143dda243823daed6bb 100644 (file)
@@ -791,7 +791,7 @@ static int ks7010_upload_firmware(struct ks_wlan_private *priv,
 
        retval = request_firmware(&fw_entry, ROM_FILE, &priv->ks_wlan_hw.sdio_card->func->dev);
        if (retval)
-               return retval;
+               goto error_out0;
 
        length = fw_entry->size;