From patchwork Thu Jan 21 11:57:59 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudip Mukherjee X-Patchwork-Id: 8080531 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 519759F1CC for ; Thu, 21 Jan 2016 11:58:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7CB4F20585 for ; Thu, 21 Jan 2016 11:58:56 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 4520E2039E for ; Thu, 21 Jan 2016 11:58:55 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 4A10B260599; Thu, 21 Jan 2016 12:58:54 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 1B8F52605B0; Thu, 21 Jan 2016 12:58:36 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 4AE19260599; Thu, 21 Jan 2016 12:58:34 +0100 (CET) Received: from mail-pf0-f175.google.com (mail-pf0-f175.google.com [209.85.192.175]) by alsa0.perex.cz (Postfix) with ESMTP id 6E325265011 for ; Thu, 21 Jan 2016 12:58:09 +0100 (CET) Received: by mail-pf0-f175.google.com with SMTP id q63so23262566pfb.1 for ; Thu, 21 Jan 2016 03:58:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=0tuOXGosy5uyyv6HWpVWeRriLkIEP26mLpHFQnhvQKQ=; b=wRmbrnD10QRegszkpxH9Dqdpi7nlTkcL+5w/xjtxi9sb77qphW7y6Z+PnOnCXSdFul gYuVOqhwGc+3qJ2jsZEppLgm+3GjpYUYPot1dlakc+o/BFpGZCJeMqVHbJj84HhW2pRG 0QNwYRK+0ppmXKKr2Q0hfylu33yHvWQgCFcv+m2d3rbfreqH0mLdnToT5Cdyv6zySP/c VAt3FN8JF8AV7npedkpQr00GtOnOUNNV87fmOacupvUCuQgmaed6IHw5aihqxzXFdOCV VXg7cAKdwttOkcc6A+iQD8PnYspnLdDkRGYLM7EeQ6/3LJ5+lljkJgdzz77A4FA8sSsJ hAxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=0tuOXGosy5uyyv6HWpVWeRriLkIEP26mLpHFQnhvQKQ=; b=fpu5JApGeVZN9ns5t7gCVrrLicx2USlgO66qCveoCREylH+q5AmnR/OFTOouZwhtK6 Jhhpt3EOQ0ouipUXixx9yTFyXHsx2W/dXMW4vpp3/xqkQOal497Zw+Ui+kI1pK+C0Vka XtSt+SUoxZUd7IcGJ3W0QOV0Ljn9xQVgBYblcWy9hYJWW5LxsbNuwJ1yuLjpoe20qoXw qQR1NTnfzgwgm9YmNJW+BRAbKz5nVeM7QsK6vcxusl8bMG+Fvp3qY2OKk8cjipnjlA/W Jr1KkxjnAbahOdI2J3jYjbH06vK2swqBn9AB/bEXF6m++f3jirYk50yD3WE6QM00PPLn w3Ag== X-Gm-Message-State: ALoCoQntl1I4FeWIpR+KoofR7XvOc27atktx5wiWHq8I7OjUh2s467dYnDD+EGaAbyOeTpiSiM+arvLUiUWxRgNd5U+tydhK4w== X-Received: by 10.98.2.216 with SMTP id 207mr60243004pfc.3.1453377488400; Thu, 21 Jan 2016 03:58:08 -0800 (PST) Received: from sudip-pc.vectortproxy.org ([183.82.227.83]) by smtp.gmail.com with ESMTPSA id w22sm2174182pfa.79.2016.01.21.03.58.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 21 Jan 2016 03:58:07 -0800 (PST) From: Sudip Mukherjee To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Date: Thu, 21 Jan 2016 17:27:59 +0530 Message-Id: <1453377479-8487-1-git-send-email-sudipm.mukherjee@gmail.com> X-Mailer: git-send-email 1.9.1 Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Sudip Mukherjee Subject: [alsa-devel] [PATCH] ASoC: Intel: Skylake: Fix memory leak X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP If snd_soc_tplg_component_load() fails we just printed an error message and returned the error code but we missed releasing the firmware. Signed-off-by: Sudip Mukherjee --- sound/soc/intel/skylake/skl-topology.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/soc/intel/skylake/skl-topology.c b/sound/soc/intel/skylake/skl-topology.c index 4624556..e81c020 100644 --- a/sound/soc/intel/skylake/skl-topology.c +++ b/sound/soc/intel/skylake/skl-topology.c @@ -1510,6 +1510,7 @@ int skl_tplg_init(struct snd_soc_platform *platform, struct hdac_ext_bus *ebus) &skl_tplg_ops, fw, 0); if (ret < 0) { dev_err(bus->dev, "tplg component load failed%d\n", ret); + release_firmware(fw); return -EINVAL; }