From patchwork Thu Sep 5 16:17:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 173164 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ce:0:0:0:0 with SMTP id r14csp935737ilq; Thu, 5 Sep 2019 09:18:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqwOu6kRMaAw95stFA+7iduCw8fdG0H0tHP03x+UZN/os+lCkxcRsuQfsDJUPiQRfUFaHO2F X-Received: by 2002:a63:de4c:: with SMTP id y12mr4002236pgi.264.1567700327628; Thu, 05 Sep 2019 09:18:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567700327; cv=none; d=google.com; s=arc-20160816; b=y4kda85v42yEc9UrMyG0iF9l6kUhl8PswmHqj9TgpA/s5T22GUzQ7glwlCarIyKdlC RMFk4Pvw89LvudsV5v0N7grXndmstdPLh8/8f4DyhCyRgntww4C4N64g6FHL3Yk0Uz1E v3h8THIflaSH7c8fC5bJ6j+sxJllhjiYvoKDv78k0UAO505GxuTo44lLN32s/bz5rApj usZLWeg82ufYiLystW9wjoDKBJKrJ+dHRsQJ5QExckbL7Ksc+ZcPZZ6Tukbok2ptxGyr kRM41G8DTTEPc10o93gJ/ODPkZ0qTot7NW7GUsiTarP9kMiI9FRzpa02EdzMbDwy1HvM oO/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=k4RSHQziswwPF3IEl7odNlbX/Lq1Hx75YDWK/+CVFu0=; b=OXF0tDVjbd4tXNWjcSOZbZsL4fHPOf6heV5Db8xjB7Wh15lY6MUxJZOmS2uwxqKWGb 7dCUtqw3fArS0ATxtUvnQBKQ5qFBJ33W49ldZG1ECcJcMkZzlUvqIFHfMYSBhqURDFbZ EwcOWEsZosuTny1Nx1J8FN/jubhABVQ4KKsS3/gyY7LKNyZ3XohgpraHYo56An3arkTe KWL6DOaBP0Gq90Ae5QL+j3S3N2FgCSs5I2S6qJkA6mt1sVY0WMs+V2mP40AM+1FH+zGt J9JLtvHq/JpU9PcifJeKf1bGxpr0CzE0NOFy0XixUMnXpMGZnGfqzi9ofJZ2W6oSxaEh RVng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jZZB1l94; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h1si2485107pje.44.2019.09.05.09.18.47; Thu, 05 Sep 2019 09:18:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jZZB1l94; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388682AbfIEQSq (ORCPT + 11 others); Thu, 5 Sep 2019 12:18:46 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:43336 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388431AbfIEQSU (ORCPT ); Thu, 5 Sep 2019 12:18:20 -0400 Received: by mail-pf1-f195.google.com with SMTP id d15so2061123pfo.10 for ; Thu, 05 Sep 2019 09:18:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=k4RSHQziswwPF3IEl7odNlbX/Lq1Hx75YDWK/+CVFu0=; b=jZZB1l94YWLd3tFIaGQ47yvMyJb9LlEazs2Ow8RBBjQ4l/r+vNhmddIWpMfHfHXs50 78rWPPNCOz1OQu1AmHck6xNxXoRE7CFw9P+2slSZQz2Ys6D042/onIrEufTy+6xGnf7G /W7VbSFrbc056Zl/UdlRSDhj5hSjjoWsrULBTO1dp2b+2wVkNBYy15jzvUSO7Yol26Pq +a0ju3yHvCNmc2ezasYLStXloGX/OXTLGO31IarwZm/OPn8nU0nkbRODmTltiIBUdlzi njdrh0EUYg8SUhgdMLrNIUsilQw7WpjaCy9U6aj+BbrkPvrH3K1Yod5NAymx6bhyqYRw 48AQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=k4RSHQziswwPF3IEl7odNlbX/Lq1Hx75YDWK/+CVFu0=; b=Niu1f1kTMB/eh1LkQKITtm3pyeACykI+z3c3R1LfaPx5QUNHzkqUXG2A2BMf0toIE9 03sWTkSY0WsL3ZRu9xMqHGKplh56mBidG2lclxtUXJgnZE4rQTcJfAWF260fOzXi111E gUSJqxIXCWdR8ueXAaAC4AtKPDfGjlgVklCwIzY4xh+/43ihEvRVMmE5ok677BFLAZCH 05V6W7Hpn2F2btdLEgSJ7/OpsgAJPm6VkT4dJJsYgEup3L/iwl5IpURBUD2KDUko9Z/q fIq1kJUTQ21/0G5IIh9XIQ01Z3GtPIBdn1DGaxGBZXVF09/d6ctAmKx6Au6surTZZfNB Qs3w== X-Gm-Message-State: APjAAAXpgnO7Lz77eUODB/3Q4hTKiiwAyNMRpdyEMvErdTeocZvpEgb1 gHF8xPO6nRz/8XbF2QuRT0GeuA== X-Received: by 2002:a63:714a:: with SMTP id b10mr4066928pgn.25.1567700299222; Thu, 05 Sep 2019 09:18:19 -0700 (PDT) Received: from xps15.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id m129sm6324005pga.39.2019.09.05.09.18.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Sep 2019 09:18:18 -0700 (PDT) From: Mathieu Poirier To: stable@vger.kernel.org Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-omap@vger.kernel.org, linux-i2c@vger.kernel.org, linux-pci@vger.kernel.org, linux-mtd@lists.infradead.org Subject: [BACKPORT 4.14.y 15/18] ASoC: davinci: Kill BUG_ON() usage Date: Thu, 5 Sep 2019 10:17:56 -0600 Message-Id: <20190905161759.28036-16-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190905161759.28036-1-mathieu.poirier@linaro.org> References: <20190905161759.28036-1-mathieu.poirier@linaro.org> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org From: Takashi Iwai commit befff4fbc27e19b14b343eb4a65d8f75d38b6230 upstream Don't use BUG_ON() for a non-critical sanity check on production systems. This patch replaces with a softer WARN_ON() and an error path. Signed-off-by: Takashi Iwai Signed-off-by: Mark Brown Signed-off-by: Mathieu Poirier --- sound/soc/davinci/davinci-mcasp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.17.1 diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c index af6cd8b874f5..b4e6f4a04cb6 100644 --- a/sound/soc/davinci/davinci-mcasp.c +++ b/sound/soc/davinci/davinci-mcasp.c @@ -1748,7 +1748,8 @@ static int davinci_mcasp_get_dma_type(struct davinci_mcasp *mcasp) PTR_ERR(chan)); return PTR_ERR(chan); } - BUG_ON(!chan->device || !chan->device->dev); + if (WARN_ON(!chan->device || !chan->device->dev)) + return -EINVAL; if (chan->device->dev->of_node) ret = of_property_read_string(chan->device->dev->of_node, From patchwork Thu Sep 5 16:17:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 173163 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ce:0:0:0:0 with SMTP id r14csp935436ilq; Thu, 5 Sep 2019 09:18:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqw470A4CANfonAgXn3LVUHbrY76cUmbPsIDziNUDwoP9+bnVNxfVgI74I1uGEGq+MXASlEi X-Received: by 2002:a17:90a:db48:: with SMTP id u8mr608633pjx.39.1567700314067; Thu, 05 Sep 2019 09:18:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567700314; cv=none; d=google.com; s=arc-20160816; b=VJ7K+ifpanpnK+uqxsBGOX74aXaVSXwnOU48n0TaUMKrAMT8xVU8XJSEPw3pW9SYI+ 6+cOQLle696ifwcX0tEE7P8Vx6ocYxOrqekSRfDije1bnLy2sMSvqLD1VFWO6YxFkLUt ozjrX82fgS9Gw61EYkrc2k26rBOOvYYN1+ZbMIcY2s3Q300wK7iRnkLtMWAhXlLUK0n0 fFcwCmWbsMCnTInz3wdLQHEYfF+SzauZYQPFyhaGJC33Wh8nMvISvrdSgyghZtKidumD kBttuJ2htFRSfyW6aufrJ7QwKia86UGGKYnvN+KtubpAiHGtEJmXR/5GtBCL4swh9TDT fPrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=uGQDHiVh7Y3nm+Fh7RZmraqTkygsaWl9aTS4H8V2qOg=; b=tzRn4sgws/q5WMl+o15G/E8dG5NQCv2Y0rseqr/5lWP4M2GxC9S9+zdKQP94dGUFBw mNeqDJs5N49ERkEEh+NRRL0euR50hH0lt2i0mCnkqPSZGZFwGPlonot0F+YBy8IyXBgM SbXkS7uaYsIarSIc59RH2RDaN1aLpdjFW8Ccza4ev7ymOUKEeEL8fMoTl78Ko4OD0vzB AVaL2sDfOqdKINRW0Si7ZIKkSRt80x4Cq030Pu4tjPis7+yuRQ+tuBVPkB2AvolOMh5P FaXv18fnnIkV7xvNGJJHtcHtMKXbchNpgCZs7bDdVxQEz4hinzhQYVSMJzb2Gl3Z7IOQ 0KFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=G2V7SSCD; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u3si2103819pgm.122.2019.09.05.09.18.33; Thu, 05 Sep 2019 09:18:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=G2V7SSCD; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388522AbfIEQSW (ORCPT + 11 others); Thu, 5 Sep 2019 12:18:22 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:37751 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388676AbfIEQSV (ORCPT ); Thu, 5 Sep 2019 12:18:21 -0400 Received: by mail-pf1-f196.google.com with SMTP id y9so2078967pfl.4 for ; Thu, 05 Sep 2019 09:18:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=uGQDHiVh7Y3nm+Fh7RZmraqTkygsaWl9aTS4H8V2qOg=; b=G2V7SSCDYkEQo7LiHhdd0FmXiDoCypwneNd0t71NKBiF5VjSYh7im1hJZ8psR9OmdS vENjDDDDtQ6NwdMR/F+BtzcV44YofhYGBf5najafmfR9bR99jS1kCvdcrsHzlLCSSxeK 7GcxrvgtY7wXU8hlt8M2yDvumDEEvUFc4v5wE3taJ+LuREXiOMnvl/Lw2ns+rIOFePa8 KXF5jz1R9EzIfWODk0dy/N4ScNQsSc3JHGq4NtqlEeVnjTRTJemxCs9WCnFjW8eLTaw0 DZr6IXQltw83ioNUii9IPkrTtAIZFHKWIM+WRq0gtusHdP3ZkBTPW2WufSyZjWejUhJa 2Maw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=uGQDHiVh7Y3nm+Fh7RZmraqTkygsaWl9aTS4H8V2qOg=; b=Nfw37/QW6K9kJiBBLoObZN6Qxqp7GqBXr70HjqINyMQPHNMO1O3murvHG6cOCVqZTT hpYFW9jmRPCLiv50Ryw/7rPdoP3ztJSzKQSXd83r5YljsZAfKn436Gm3R5QNYPQIevBT ZHboyX2Z62Uk/wENuuAMOkayJCbe+wOqw8ACe0D9M8CNXw4VLcyXFhJPxfTtIAkz21RF 5XvM/VJRyJHo0jp4iWgZNNP2jJu8FUPllYKwhedj+QftpZ7LRYfCN8PcdG41qY9eHaHG bvDyFtyQ6Q+qvGUrVyOmk3TkyUxBP95MIvE0BoQLc9cgfwH4+cRNbPaw39YoXiaQajOY pkLA== X-Gm-Message-State: APjAAAXmhc0FZNSIVvRDP1cN6eideUw0rMVX7pJzZaso18oqXZNrsFQP NJ6Ozy17biwtZTYCWHVHbN6Tiw== X-Received: by 2002:a63:ff0c:: with SMTP id k12mr3771562pgi.186.1567700300722; Thu, 05 Sep 2019 09:18:20 -0700 (PDT) Received: from xps15.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id m129sm6324005pga.39.2019.09.05.09.18.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Sep 2019 09:18:19 -0700 (PDT) From: Mathieu Poirier To: stable@vger.kernel.org Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-omap@vger.kernel.org, linux-i2c@vger.kernel.org, linux-pci@vger.kernel.org, linux-mtd@lists.infradead.org Subject: [BACKPORT 4.14.y 16/18] ASoC: davinci-mcasp: Fix an error handling path in 'davinci_mcasp_probe()' Date: Thu, 5 Sep 2019 10:17:57 -0600 Message-Id: <20190905161759.28036-17-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190905161759.28036-1-mathieu.poirier@linaro.org> References: <20190905161759.28036-1-mathieu.poirier@linaro.org> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org From: Christophe Jaillet commit 1b8b68b05d1868404316d32e20782b00442aba90 upstream All error handling paths in this function 'goto err' except this one. If one of the 2 previous memory allocations fails, we should go through the existing error handling path. Otherwise there is an unbalanced pm_runtime_enable()/pm_runtime_disable(). Fixes: dd55ff8346a9 ("ASoC: davinci-mcasp: Add set_tdm_slots() support") Signed-off-by: Christophe JAILLET Acked-by: Peter Ujfalusi Signed-off-by: Mark Brown Signed-off-by: Mathieu Poirier --- sound/soc/davinci/davinci-mcasp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) -- 2.17.1 diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c index b4e6f4a04cb6..07bac9ea65c4 100644 --- a/sound/soc/davinci/davinci-mcasp.c +++ b/sound/soc/davinci/davinci-mcasp.c @@ -2022,8 +2022,10 @@ static int davinci_mcasp_probe(struct platform_device *pdev) GFP_KERNEL); if (!mcasp->chconstr[SNDRV_PCM_STREAM_PLAYBACK].list || - !mcasp->chconstr[SNDRV_PCM_STREAM_CAPTURE].list) - return -ENOMEM; + !mcasp->chconstr[SNDRV_PCM_STREAM_CAPTURE].list) { + ret = -ENOMEM; + goto err; + } ret = davinci_mcasp_set_ch_constraints(mcasp); if (ret) From patchwork Thu Sep 5 16:17:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 173160 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ce:0:0:0:0 with SMTP id r14csp935236ilq; Thu, 5 Sep 2019 09:18:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqza3uNcDR6Ha8oTunqCllOm+iLqboQTq+9inAAKXqUuo73tZDJ6GgHQtPe15C+ZMywIjC0x X-Received: by 2002:a17:902:9a8d:: with SMTP id w13mr4271249plp.157.1567700305908; Thu, 05 Sep 2019 09:18:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567700305; cv=none; d=google.com; s=arc-20160816; b=ATCORsKRTscccivPXNJw66CMu7cS7ZbJuaPYfbphLy7+uciZW++xHn0AaTyIoXeuOy zpfCKDbQwq8FAxFjL7/dtIYor8Wt419tzwJgXB7kzKAaHfnWnQBa+Qwld6MScXHIRCoi ClAzMUImzByujcQDhxYm4lu3gDxcmY1v6IeHMkNx84YqJXHIYjMrRgrCALfi3lv0cMoT ZPEUaO7UIUIcriaFmzGcv8u/Galao1aCAkpNdimd+nMqRrO0wZ3EeFm4p2V/yXaLBxjr VL6BVFw2Cq+gYHsVL4XZewWJ1vBRECr7kBH494gt+VSvAc+FZbZTeJLHV7UgJRcYLQWt lV7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=KBEjaWO3Fe2PBzPolu3WMn8NTAUiCD8HB53ny3BQ6OI=; b=IX8KZ4RbRdHN9LIzcTfCk6OtUp+Snlxjz9WoZ458YHjgD1dHzXcjGoveSfodMdyAdE Gr5yg0HTjDgcyG/anZVCik3iGv3/ShHY0byKYiFtvHkNHqgbrZiRm0rqE5aiyt31iEWC 0ZI02hKJPpT0855M5sKY9c5SdMVXitnNaADCkqul8ZY5vTGllaSXU2ug/gbXba2BPcL/ Uaq12iDkjv+txGbh87813ry+LRMYuTlDvB2mZxdTZ/TLnUWJfU3icXv6LrA7It4UXXYX /KdxYC96AtgmMxwPS/gTyzsKZ3xQiNYWC4hurQw0Dz0TlZRIUdyhxJtUaQ2wGW9VKw9L 5dkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=plmQ8J8h; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b13si2148057pgr.460.2019.09.05.09.18.25; Thu, 05 Sep 2019 09:18:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=plmQ8J8h; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388890AbfIEQSY (ORCPT + 11 others); Thu, 5 Sep 2019 12:18:24 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:42056 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388824AbfIEQSX (ORCPT ); Thu, 5 Sep 2019 12:18:23 -0400 Received: by mail-pf1-f193.google.com with SMTP id w22so2063292pfi.9 for ; Thu, 05 Sep 2019 09:18:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=KBEjaWO3Fe2PBzPolu3WMn8NTAUiCD8HB53ny3BQ6OI=; b=plmQ8J8hM7P284lC2RlFaPT3UU/0f+9eU9WDxSbYt7bW8T1tbLLfVU8NYjquQ7LNE4 KnLS0x5VNgK3M6FqfPB2sD3wKmxbXx14Gobu/OwtOpbYXU/IkghbfCOdM1Mm7JXUh+Re OGs1MQyDI9D6huwbn+67NCfvpkEUEztWZnuG+dI47z8mROznT1jdRnoaXcW7sxDawxXv Prljpk4ow91RFRvrdX2X7chbuX2fROHQ8DJAAJyHeGbf0V0cbS24NfqzYiaVo4TwwtW2 kTkXUjGOt5qiIylni0ye87NDZ87V7CWg9z4DmQC6OdJUkaVDj8vy3LiXlIYHBzvmnKx/ lkjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=KBEjaWO3Fe2PBzPolu3WMn8NTAUiCD8HB53ny3BQ6OI=; b=G8RhFWIW2w5CGLZ4GkIPgHu0Quud4pmmYU32XjDGC+HOZ+6gkc7KnwpC9tM2tAXAYm n9PwT0yaDyTRexHka4uMZvq6atIv4RZKM9ud0wHPyPvr9KgHfC2TV126kpdlzfj+0ADh ah4JxfYgMx6gLky3ZGrQfcNuXklSwkYXlL7/CUni+FaoDIawCxakIieijWur+jWvoofu VabKgzNaTQNEQe+G5YKmLXVxPVopPfpparJXlybJ8abOjUHSFq+mvjTTJMF8+lK6oUzj 3hdTywjW1CFgdLP8lsHZmMBMKjlc263amW6PXEG97Xp89QOX6ooQN9vGpZmKkUz0fgAY KanA== X-Gm-Message-State: APjAAAVojr7GghvJ/MoFJuqZlt7Et5+kjWF5gJ6+UX1okYBgZ6fsAjJ+ ntAQtMKJZPD1/0XvW6eOUuXHfg== X-Received: by 2002:a63:89c2:: with SMTP id v185mr3909722pgd.241.1567700303006; Thu, 05 Sep 2019 09:18:23 -0700 (PDT) Received: from xps15.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id m129sm6324005pga.39.2019.09.05.09.18.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Sep 2019 09:18:22 -0700 (PDT) From: Mathieu Poirier To: stable@vger.kernel.org Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-omap@vger.kernel.org, linux-i2c@vger.kernel.org, linux-pci@vger.kernel.org, linux-mtd@lists.infradead.org Subject: [BACKPORT 4.14.y 18/18] cpufreq: ti-cpufreq: add missing of_node_put() Date: Thu, 5 Sep 2019 10:17:59 -0600 Message-Id: <20190905161759.28036-19-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190905161759.28036-1-mathieu.poirier@linaro.org> References: <20190905161759.28036-1-mathieu.poirier@linaro.org> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org From: Zumeng Chen commit 248aefdcc3a7e0cfbd014946b4dead63e750e71b upstream call of_node_put to release the refcount of np. Signed-off-by: Zumeng Chen Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki Signed-off-by: Mathieu Poirier --- drivers/cpufreq/ti-cpufreq.c | 1 + 1 file changed, 1 insertion(+) -- 2.17.1 diff --git a/drivers/cpufreq/ti-cpufreq.c b/drivers/cpufreq/ti-cpufreq.c index 4bf47de6101f..cadc324bedb4 100644 --- a/drivers/cpufreq/ti-cpufreq.c +++ b/drivers/cpufreq/ti-cpufreq.c @@ -205,6 +205,7 @@ static int ti_cpufreq_init(void) np = of_find_node_by_path("/"); match = of_match_node(ti_cpufreq_of_match, np); + of_node_put(np); if (!match) return -ENODEV;