From: Sudip Mukherjee Date: Sun, 4 Sep 2016 15:00:19 +0000 (+0530) Subject: staging: ks7010: fix memory leak X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=b80cfea24b02bcdc94cdbf67091d7b1c27ba6cd4;p=linux-beck.git staging: ks7010: fix memory leak 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/ks7010/ks7010_sdio.c b/drivers/staging/ks7010/ks7010_sdio.c index 7bcf1ea61861..86cdebe47db6 100644 --- a/drivers/staging/ks7010/ks7010_sdio.c +++ b/drivers/staging/ks7010/ks7010_sdio.c @@ -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;