From patchwork Tue Jun 23 19:56:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 223471 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.0 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2F6A3C433E0 for ; Tue, 23 Jun 2020 20:29:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 095202070E for ; Tue, 23 Jun 2020 20:29:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592944142; bh=Cb/1zkzLCwyUr1J7Sf3+9a9YlTM3sRWLJie4afX0Vao=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=jtfr55tChXNODQuXxu2o66mnP1tCNOHNeOxxNvTJy+0xKDUIYu15/4/rFqe+6T3on GUFqiUFZ7bG7LNs5WG7ST7JaNA+m93h52CE8ZvX+t05gpx5fKXTpd7rAKR2rE3v35T 1Vz1flS6C6kQ5MW19psB/7do5VijyOkFaOv6Fn+I= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390935AbgFWU3A (ORCPT ); Tue, 23 Jun 2020 16:29:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:48890 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390919AbgFWU26 (ORCPT ); Tue, 23 Jun 2020 16:28:58 -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 BD2DA2064B; Tue, 23 Jun 2020 20:28:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592944138; bh=Cb/1zkzLCwyUr1J7Sf3+9a9YlTM3sRWLJie4afX0Vao=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LlyfSx802YMWZ3plb8CK21b9/M0sft6EzcdJMYkrjTonWQCwMHvudThpQ/O/rspbn mqAKHupE+wZHBrcDAEzHvVGBEcPGqzFbhb8kWm2YkP0gzIj8sRPU+4PIxz2JU5Wdq5 5b5zHWwErvnjO+xuuwNin//0hDIqz4TjehK6TARQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Qiushi Wu , Mark Brown , Sasha Levin Subject: [PATCH 5.4 187/314] ASoC: fix incomplete error-handling in img_i2s_in_probe. Date: Tue, 23 Jun 2020 21:56:22 +0200 Message-Id: <20200623195347.827249961@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200623195338.770401005@linuxfoundation.org> References: <20200623195338.770401005@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Qiushi Wu [ Upstream commit 25bf943e4e7b47282bd86ae7d39e039217ebb007 ] Function "pm_runtime_get_sync()" is not handled by "pm_runtime_put()" if "PTR_ERR(rst) == -EPROBE_DEFER". Fix this issue by adding "pm_runtime_put()" into this error path. Fixes: f65bb92ca12e ("ASoC: img-i2s-in: Add runtime PM") Signed-off-by: Qiushi Wu Link: https://lore.kernel.org/r/20200525055011.31925-1-wu000273@umn.edu Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/img/img-i2s-in.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/soc/img/img-i2s-in.c b/sound/soc/img/img-i2s-in.c index fdd2c73fd2fac..869fe0068cbd3 100644 --- a/sound/soc/img/img-i2s-in.c +++ b/sound/soc/img/img-i2s-in.c @@ -482,6 +482,7 @@ static int img_i2s_in_probe(struct platform_device *pdev) if (IS_ERR(rst)) { if (PTR_ERR(rst) == -EPROBE_DEFER) { ret = -EPROBE_DEFER; + pm_runtime_put(&pdev->dev); goto err_suspend; }