Received: by 2002:a17:90b:8d0:0:0:0:0 with SMTP id ds16csp4882707pjb; Mon, 27 Jul 2020 07:31:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyFOObgQQNw+KUjrJPaSgj9wDDV0fFW7QVy1K0jT3XfZGD0AQNyCnJ4qZFOk5qWn3psIwcO X-Received: by 2002:aa7:c788:: with SMTP id n8mr1752980eds.146.1595860303481; Mon, 27 Jul 2020 07:31:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595860303; cv=none; d=google.com; s=arc-20160816; b=obTwZ1FbV3iwrR6RbodjKytxFUUZQ81Z1blsKg+fR1+WcxFnkalX1Zw3U8ltBKh+gi /RHB8q0nEEbVIXjg9t2SLWM/y6omnUP3WGsPh7rcVwmOP0An0xpaa30aKUCC+HkYrNfO WfJ8pUUOsxjCDXxsUwVMiO1C+tbP2MdaWhLaa9+aBIeEZPycYGsrxeNQIVdEUuBnUxo1 4tFPxOVe3avRvsoLdrvet8+gtcK3odbKi7ohMD4dzraDth7LprzNGbdZXcn0ZVVmcmh3 f/Mj9O/YItgjTQY1myn6w9jeKGoJOgtZ1aPudXuYb8jOSjjJQZCLDxcxG8LGKrBzv3p5 9KeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=0uWra7TciErwyMm35v0rFhlAFMkytjvLCtbbor0+CoA=; b=VWTN0SmR89SQXqTILeFp5UYTa1Fi+zRO595cCopI8cJFaCqe+GJu1OzN6bbu3k2vu+ cg+84rfMfkK1MV242q6hwTk1yF7k0y80HNS+tDqz4b2cyIRX95eQLAdEkSR9pO5G9kzX xvCUX2OLTIPWAWDENX3J3BjJYZFJvU53P0+yQ9VaD++9GHUU9kP+2VpM/Ard4GoYTjeB 21ead1vEqHSMam8fi6WwBXA+TLdmIXSi0MOStOFlCt6F+zVlJmyVrz4idWM4mULpiMoX s9NFgBlo0Axg8Tw6zmdHEveYMd4p+eorucwyk6y2Ny1r6s9acq1nh3DavZw2UicMFUOR +hBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=mxZkny6x; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c4si5555063eds.108.2020.07.27.07.31.21; Mon, 27 Jul 2020 07:31:43 -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=mxZkny6x; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731889AbgG0OW1 (ORCPT + 99 others); Mon, 27 Jul 2020 10:22:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:51308 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731868AbgG0OWX (ORCPT ); Mon, 27 Jul 2020 10:22:23 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 4DE1C2075A; Mon, 27 Jul 2020 14:22:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595859742; bh=NX0l8dfROV94VxMJKeLtPTYCNriVw+Y58Z4ap4h0UJM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mxZkny6xhgQnV/f5Rb3q0xSPzxnyS8nMU7wl5os/uNETGZE3PPXEY6GEKfrG9g0X6 OYgLfFHX4gRP1T1M9DfofE9fHbBt5zmprcHU9zcGJPhig4wZBYZwe1Ca0+yyKoo1aT O+A7SoQ9xLSNme7NrVKI/uJepnF5Qb8cAoDNjZXI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jing Xiangfeng , Hans de Goede , Pierre-Louis Bossart , Mark Brown , Sasha Levin Subject: [PATCH 5.7 057/179] ASoC: Intel: bytcht_es8316: Add missed put_device() Date: Mon, 27 Jul 2020 16:03:52 +0200 Message-Id: <20200727134935.448089661@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200727134932.659499757@linuxfoundation.org> References: <20200727134932.659499757@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jing Xiangfeng [ Upstream commit b3df80ab6d147d4738be242e1c91e5fdbb6b03ef ] snd_byt_cht_es8316_mc_probe() misses to call put_device() in an error path. Add the missed function call to fix it. Fixes: ba49cf6f8e4a ("ASoC: Intel: bytcht_es8316: Add quirk for inverted jack detect") Signed-off-by: Jing Xiangfeng Reviewed-by: Hans de Goede Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200714080918.148196-1-jingxiangfeng@huawei.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/intel/boards/bytcht_es8316.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sound/soc/intel/boards/bytcht_es8316.c b/sound/soc/intel/boards/bytcht_es8316.c index ddcd070100ef4..b3fd7de594d79 100644 --- a/sound/soc/intel/boards/bytcht_es8316.c +++ b/sound/soc/intel/boards/bytcht_es8316.c @@ -543,8 +543,10 @@ static int snd_byt_cht_es8316_mc_probe(struct platform_device *pdev) if (cnt) { ret = device_add_properties(codec_dev, props); - if (ret) + if (ret) { + put_device(codec_dev); return ret; + } } devm_acpi_dev_add_driver_gpios(codec_dev, byt_cht_es8316_gpios); -- 2.25.1