Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp528413pxx; Wed, 28 Oct 2020 10:21:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz5gzPUELF9r3e6jqYAtMriyH/xINNVc7uSAnb3/IZXE8RBn9LDdCRznWSQkRknzo+KSvJ0 X-Received: by 2002:aa7:d4d8:: with SMTP id t24mr9071239edr.247.1603905669244; Wed, 28 Oct 2020 10:21:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603905669; cv=none; d=google.com; s=arc-20160816; b=UM6axPxXbud1//9pgpN9sJ3waO2pbEpsG+w7GnOxdz6lgdLEmLKQuPQUYZC5XJi0YL 1h6TLid95BsCTbb9Li92I+FQw0nUsJ23wTCJxTTRkiv0skhqktrIYcREXUQz3W78Pbig Wstgk5U4aW53gssS7lDGqil8p4g/kUdscLqqH6MF9deKrLm90qXVuQqfFl8fp+yTgCC3 Wz3NniNZJeBTACLFH3EUwUQ9Wk28FScNcrWWFtZH+fwNsyPo9wrgyCRXx+TRDIjQ1dsc 7iJJ+D8Go0G/dTOliYDql3PEyzAGSXlRe2l1n5uK1kf5PA4rmU1X7vGgwlwminuK/ecU U5vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=YUHBs+ruK0PI17ighYPU2Z6qt2G0QHqOAm5Iv2DdSa8=; b=UrSEoS7g3kdcVaxBAnIACxV9q4zDHQc15Txk5QQmcJSpB7CcH8UN436Rr7D/9EeiPt O2pdS1SzCPPKMlkTnJ2HMb7jA0rMePaDixskxHiOW6DniAbA7mOmOzIpy1KiSwBAY31g 0YadCxRGWnPZh7QdSTiLfHuCbuqumWPzHPJAFmR7biaXXIgVrn7xVwkJwxUOPoXqZ1Z5 2a0+RS4p+HYRR2RNLjtCzVfVWtq+zxVftBVA/8uG9R/3HXFY6vSPKBokUKq+agAl4mUT iIHYsxCY5eGDugLbwclquamvABrDJRuODtav6oH6twBifxBvWW8tsdBGm56fu2H2dsk2 1vcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="FgJm/7n1"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m26si11386edq.372.2020.10.28.10.20.46; Wed, 28 Oct 2020 10:21:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="FgJm/7n1"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1820803AbgJ0Rih (ORCPT + 99 others); Tue, 27 Oct 2020 13:38:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:33402 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753718AbgJ0Oeg (ORCPT ); Tue, 27 Oct 2020 10:34:36 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7BDCD20709; Tue, 27 Oct 2020 14:34:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603809276; bh=fy9N58wjZup82r/EkguW3PAFikuqfdGSsjTn1IAuGoY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FgJm/7n1KWMW+c0/ooHWy7giK20Dz/0DCuWAyZA9ARcbQxyipCUdy0V+bjfpdtntn mvhjiCSkrM/pNNuOE5iSzo3NiJ/FiGUf9auxJnBI0gG6izd6BDxBzZpFavC9XlUTLx 191ieqbzquOkD9ZrOLwjBBsV7q1B7iksD6u0bezQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yu Kuai , Mark Brown , Sasha Levin Subject: [PATCH 5.4 138/408] ASoC: fsl: imx-es8328: add missing put_device() call in imx_es8328_probe() Date: Tue, 27 Oct 2020 14:51:16 +0100 Message-Id: <20201027135501.501890393@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135455.027547757@linuxfoundation.org> References: <20201027135455.027547757@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yu Kuai [ Upstream commit e525db7e4b44c5b2b5aac0dad24e23cb58c54d22 ] if of_find_device_by_node() succeed, imx_es8328_probe() doesn't have a corresponding put_device(). Thus add a jump target to fix the exception handling for this function implementation. Fixes: 7e7292dba215 ("ASoC: fsl: add imx-es8328 machine driver") Signed-off-by: Yu Kuai Link: https://lore.kernel.org/r/20200825130224.1488694-1-yukuai3@huawei.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/fsl/imx-es8328.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/sound/soc/fsl/imx-es8328.c b/sound/soc/fsl/imx-es8328.c index 15a27a2cd0cae..fad1eb6253d53 100644 --- a/sound/soc/fsl/imx-es8328.c +++ b/sound/soc/fsl/imx-es8328.c @@ -145,13 +145,13 @@ static int imx_es8328_probe(struct platform_device *pdev) data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL); if (!data) { ret = -ENOMEM; - goto fail; + goto put_device; } comp = devm_kzalloc(dev, 3 * sizeof(*comp), GFP_KERNEL); if (!comp) { ret = -ENOMEM; - goto fail; + goto put_device; } data->dev = dev; @@ -182,12 +182,12 @@ static int imx_es8328_probe(struct platform_device *pdev) ret = snd_soc_of_parse_card_name(&data->card, "model"); if (ret) { dev_err(dev, "Unable to parse card name\n"); - goto fail; + goto put_device; } ret = snd_soc_of_parse_audio_routing(&data->card, "audio-routing"); if (ret) { dev_err(dev, "Unable to parse routing: %d\n", ret); - goto fail; + goto put_device; } data->card.num_links = 1; data->card.owner = THIS_MODULE; @@ -196,10 +196,12 @@ static int imx_es8328_probe(struct platform_device *pdev) ret = snd_soc_register_card(&data->card); if (ret) { dev_err(dev, "Unable to register: %d\n", ret); - goto fail; + goto put_device; } platform_set_drvdata(pdev, data); +put_device: + put_device(&ssi_pdev->dev); fail: of_node_put(ssi_np); of_node_put(codec_np); -- 2.25.1