Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3198547pxb; Mon, 9 Nov 2020 05:24:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJwxD8PpcqlmJZelpXWDDNSZwhiNvcIpFZTDLBHtsXqY1+buBEPtDYVyg9Z6MH3Or1rZ+Ia5 X-Received: by 2002:a50:930f:: with SMTP id m15mr15620194eda.112.1604928263249; Mon, 09 Nov 2020 05:24:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604928263; cv=none; d=google.com; s=arc-20160816; b=UaQVJOp3SghOfb2CdXO7cDmuR+CrlwYyHlpW9mL8rOwhDwx0ZvpldXXw0kBlxuWuf2 PtFrz4BhKGiEe6h9Z9me0W9h5MFE/mKUYVff1iS/a1GyC2AsU+0Z9BdrlAr84JMlOy2u BTlJ9iVsprzBQdi/JXcyeC2VIexXhdbOJgNMNL9/4e7tSFRR70NTr2O6+/69/ZPJtMY+ rg94P00pjtkKZF2Fi74ltE5ksYr5hMhWyO/4rvJUVi8JHqHC8eiY5iN7P2xrPgNiNw2F wDFOpxdHNJUX3R32meuu8Sx0D8OWIVPlu44r7p9DFklT57vUAbW7+lqYRAJaE9U3BX1f Yp4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=2m4wyJEfv532k87ozb2XpiZaraLGYdhcqnwO40z0XvA=; b=XQUrPwAE0QaWL4Qm5EutB0TqY0fxxV6STdiCQ0Zh49qqN7VZ+utbWD6q7OCNWZQi9H taL/0z4yc1qX4jzVpH/R1UmXcTYlVtsJHVTPdsEly1V/LdbohehYRF2q+qmUwCydw7Yq FSEhLQxO+1bJ34v1ToZpzEIeenCVOFKdrsf0IEOl+EGDd1D5nAq9yr/hNraCETvOSJ/T TkHr/E+gfG3jj9e9crtSnvzFDqDSBPc7lgoneK7XdhuYhRv7ZpT9KKcMvJPCZc5GfnUd 3on+hpv4jma/h4T3H9D1sT9Fmn3FPCI4m7NhX9hgP5kihMmlHexV5rQWhVr8cdqU5tu7 V9Zw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="U8+T0F/c"; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id di3si6725151edb.554.2020.11.09.05.23.59; Mon, 09 Nov 2020 05:24:23 -0800 (PST) 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="U8+T0F/c"; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388131AbgKINVx (ORCPT + 99 others); Mon, 9 Nov 2020 08:21:53 -0500 Received: from mail.kernel.org ([198.145.29.99]:49696 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388113AbgKINVr (ORCPT ); Mon, 9 Nov 2020 08:21:47 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (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 6F7B720731; Mon, 9 Nov 2020 13:21:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604928107; bh=oXlw0sds8OBpAbuRT1r3BD4nyWUh0fJiKDc4ixL3VTo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=U8+T0F/cJlV4hNJZL9sR5D2WImo0I30zBjY7Kgeck4Js9wLfbqx90a+5+tVxGWXZG TyWVDWy7wPMTxGhfDu18u7bQ0mZ7t5ReEXzR4FSxkn0gZkjHU14kURnoyQd+j1ExNN piSd+5CKAguWcIs8jT/H11DDjA7I9t6BNQQwhPvg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hoegeun Kwon , Maxime Ripard , Sasha Levin Subject: [PATCH 5.9 099/133] drm/vc4: drv: Add error handding for bind Date: Mon, 9 Nov 2020 13:56:01 +0100 Message-Id: <20201109125035.451624827@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201109125030.706496283@linuxfoundation.org> References: <20201109125030.706496283@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Hoegeun Kwon [ Upstream commit 9ce0af3e9573fb84c4c807183d13ea2a68271e4b ] There is a problem that if vc4_drm bind fails, a memory leak occurs on the drm_property_create side. Add error handding for drm_mode_config. Signed-off-by: Hoegeun Kwon Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20201027041442.30352-2-hoegeun.kwon@samsung.com Signed-off-by: Sasha Levin --- drivers/gpu/drm/vc4/vc4_drv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c index 38343d2fb4fb4..f6995e7f6eb6e 100644 --- a/drivers/gpu/drm/vc4/vc4_drv.c +++ b/drivers/gpu/drm/vc4/vc4_drv.c @@ -310,6 +310,7 @@ static int vc4_drm_bind(struct device *dev) component_unbind_all(dev, drm); gem_destroy: vc4_gem_destroy(drm); + drm_mode_config_cleanup(drm); vc4_bo_cache_destroy(drm); dev_put: drm_dev_put(drm); -- 2.27.0