Received: by 10.223.176.5 with SMTP id f5csp992010wra; Fri, 2 Feb 2018 09:21:47 -0800 (PST) X-Google-Smtp-Source: AH8x224R80xxIx2GtrAHjNZ02ioxdvvpBuPacNTp0BKfhc50byMrMt8fP9j8EJBeWiwHjvGff5Lr X-Received: by 2002:a17:902:6849:: with SMTP id f9-v6mr36631047pln.113.1517592107619; Fri, 02 Feb 2018 09:21:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517592107; cv=none; d=google.com; s=arc-20160816; b=E34VikWbUU7pk9UGN5Dg6mkk7m4Q9MLvW3mOaKSzIktO4yghrLOeNteeWOvDOtrwUW rzPtY0Mcc7yHJNmZUlMtt5/misIa58QQ14d4bagTPIct5GRISs+KcZFY7LZZ1hz2sGMY uONtd4tYGzPYzjyzbepbP/lE/wzgdRO5jnzR7YcVbLiWLUmTCQ7DPMwuwfgxC4JdB+LB HNqRTG417tr9g44iu8J0N1NkgGfY6pIPsz4ptu3tChWui7/+RKCMMUKqVIZjK8H4SJMN 1emGfoUWL4YNQH8c8A6sV/sKpa/4M2lS+CyrntAvbw2QUPqX7uS2/WIlQ+lrh/IZEPfV eBXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=xfG70MIje4QorqUw9IOQcO+wsIWg6UF0dnYmKKWLkbM=; b=UQHSGozIGKtb4xwWQmJxJXhET69YlQWkxey0aegBPmarWZwHvASNxtZIhJd7THkcvN xq7v9XBZeE/8AQCTpM9Qoqse6yLLEomtA99lhtSC7My7FwdHPGl8RvmlOMgi517o2siO 8p1y0wDgJeg6cwv+dgsXOyDx1k/XCRHxb7BxnAKForolNbq9W/8Z10mCFMtKqWMGVEol 6Pb+6zdSi9NRUB1pbeMh+MOxKZ4dSZ5OtVqtVe0bQZhvkLmr939dqUMzeUG8UA4cMvTF W6+0gSvjJMucPzAR4GPMH4JwJEjZC8lz4RI7V1K6+Df3uF02wkJNnDCcylQvlUrQgjiD DGEg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a8-v6si48949ple.375.2018.02.02.09.21.32; Fri, 02 Feb 2018 09:21:47 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753707AbeBBRTg (ORCPT + 99 others); Fri, 2 Feb 2018 12:19:36 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:38910 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753445AbeBBRMK (ORCPT ); Fri, 2 Feb 2018 12:12:10 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 7D6C3EF7; Fri, 2 Feb 2018 17:12:09 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christophe JAILLET , Tomi Valkeinen , Sasha Levin Subject: [PATCH 4.14 112/156] drm/omap: Fix error handling path in omap_dmm_probe() Date: Fri, 2 Feb 2018 17:58:13 +0100 Message-Id: <20180202140845.246322922@linuxfoundation.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180202140840.242829545@linuxfoundation.org> References: <20180202140840.242829545@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Christophe JAILLET [ Upstream commit 8677b1ac2db021ab30bb1fa34f1e56ebe0051ec3 ] If we don't find a matching device node, we must free the memory allocated in 'omap_dmm' a few lines above. Fixes: 7cb0d6c17b96 ("drm/omap: fix TILER on OMAP5") Signed-off-by: Christophe JAILLET Signed-off-by: Tomi Valkeinen Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c +++ b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c @@ -638,7 +638,8 @@ static int omap_dmm_probe(struct platfor match = of_match_node(dmm_of_match, dev->dev.of_node); if (!match) { dev_err(&dev->dev, "failed to find matching device node\n"); - return -ENODEV; + ret = -ENODEV; + goto fail; } omap_dmm->plat_data = match->data;