Received: by 10.223.176.5 with SMTP id f5csp980765wra; Fri, 2 Feb 2018 09:11:57 -0800 (PST) X-Google-Smtp-Source: AH8x225EMkPNIgkIw7zNvSgO6t1HAzZV1C73V1WpEytCtVFfejG6EyfxG8Jf7T153ZDX+Pesm9V0 X-Received: by 10.98.80.20 with SMTP id e20mr40490319pfb.148.1517591517622; Fri, 02 Feb 2018 09:11:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517591517; cv=none; d=google.com; s=arc-20160816; b=fERzN1HI0uwhYSFVlaZf6QZyaNFw9sHkJ1zSto/11twhIiRTrZX4jDA61+tdnLn4ly YkISfw1V1agBACbC5rktFsWIKXTDEZtUJN/zJaIWyf4fU78jsbnpLUy7HnCyyYTqfclV sEtvcasP3MOuyQNAUcXVZu62kt+3VTDAQvC40sgHAul6gVdObOsaWmygHGeiCb63I6cX A/AisHDwMKlQgS+slmDCEMYcID2Z5qtw0U3UeJAld84cpQt+4aSpgkxDqEmkrm56yVJQ d9W6RK0VcnOOK3eq4uccDfisE+8+mrK64HxwBMQRqFjYMpJu/1bT0z5eA/AYpxeSvfxN 9Anw== 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=zLW4gdrmQ7D+/LGJipfwPrmSLOkI4inbMZrvi5sAK1U=; b=Xw9Naqp1+hcVaw/bMKduBBX+436PelviNg/aIbKWlLqYma5duM8A1Mirekzc0W1Caf zB/YbPXcB+nCTfty/rVQLBDFoHhG04b++AyOBEdDcuVe4RzKJ7VcLI5jYa1R1LBCU0Rz oGpESP7gf4bbPihgVzgBkzk4UHQSawOBKNrHzMht7iqzjKvQdt11VkK8OX5G7wJqfikr BK8bLgzDPwGpPOR+G1OE3h/WsCHuY9wR6vEOGXH9yMfsnsFvaCJ1q2pC4TvgbPaYLKDG V9elk8wcwBp00wNosakMZ8dFaQqVJkowcKIWNiXLkqMcxbCCreNOjpHaUSv7pS3d+8Wk oqGQ== 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 y11si1702792pgv.424.2018.02.02.09.11.42; Fri, 02 Feb 2018 09:11:57 -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 S1753134AbeBBRKF (ORCPT + 99 others); Fri, 2 Feb 2018 12:10:05 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:36462 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752575AbeBBRFX (ORCPT ); Fri, 2 Feb 2018 12:05:23 -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 91266E16; Fri, 2 Feb 2018 17:05:21 +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.9 60/86] drm/omap: Fix error handling path in omap_dmm_probe() Date: Fri, 2 Feb 2018 17:58:20 +0100 Message-Id: <20180202140828.048594221@linuxfoundation.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180202140822.679101338@linuxfoundation.org> References: <20180202140822.679101338@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.9-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;