Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3194431pxb; Mon, 9 Nov 2020 05:18:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJy/NBo6bhebEKrbSyRiGfy+ikNz88XSbEmKcxxxWF9/bOKMU+4wNmo6vL7m3k7n9dheLjMn X-Received: by 2002:a17:906:c1ce:: with SMTP id bw14mr14817013ejb.302.1604927922030; Mon, 09 Nov 2020 05:18:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604927922; cv=none; d=google.com; s=arc-20160816; b=PVHaCGov3pLHpmd34pzsbO25JHT5dJfac2olTwQflCeddEDIDlEkm01ukM9oMMFQrr 20EDZhZRktkq3LS78Gefj1K7O/ln5nnN8IyG1i+gRcKuuOhJL5OhbXh1FyU7bi/Xhlvt uF7Eoiz4C/9vxegHZzHVfJ4vmXATsWHZiU/dWYMQBqQdJytDT5WxyqfSJ0k+7BCuaTSf FoBeFhz96X0Bt7BJX53PVxyo6R6Xs64utNhy2y7oSVyRciNiOXc8WoL/Qj+aJwuyYnvW 3ZAKBYBXjiQHOKJjw4jxu6cv1J0Tp/F5WG8NcJEikGiipNk/VKMsLZuPwX0aoOtzCcru DPBA== 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=/HKfNMNeARw3UpUHFacOvyAObDOAIcHiYzrz0dCgVds=; b=RiaT7fxhs+tYrWYfTgCAD7GhSsGSE+2WOfJdGiQTsxclApU1PjDsoWBvqesTmPJedm K+SRVzkiZSh31iJAzBjt5hOjJswTrhN7siPixQcNJ2boje4jJtme9H+8tRuPCOHzCtfT 0GZ82OaopK9F7aYhiAetRE7YIeSsc36T5KIQig1hT1LfogOmAKsSG8Dr6UBqbc1tvesQ nO8LAzl0CUXxgA9jmK2o8uRHo2bRPM6id3hfTIcCDr5KcjT/wX7WCdYdPekcRXlfclO+ x+/tRtiHGBdvjInoI5OsKWt3k7fNrhIZEAg9nB7tubWLYyQPGve3jBgeg7Ba7FeqvWte SBBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=GwpMFeTE; 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 r22si1572502edv.428.2020.11.09.05.18.19; Mon, 09 Nov 2020 05:18:42 -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=GwpMFeTE; 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 S1730982AbgKINOI (ORCPT + 99 others); Mon, 9 Nov 2020 08:14:08 -0500 Received: from mail.kernel.org ([198.145.29.99]:40260 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733075AbgKINOF (ORCPT ); Mon, 9 Nov 2020 08:14:05 -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 DE61A20867; Mon, 9 Nov 2020 13:14:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604927644; bh=aUzQk5vOBc+/Hfh/Vr/aJE1XyEccDnj0JJ1rxa2Jirc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GwpMFeTEC2ue76/RUYjoyFZYAy7A0RSq58gGV51v8qoneemCFoEnxPd5NYU9ysz3U aUlmI5EAL1gMvefzE/VwGeqSnh8xnM4/PxDA08WejwnvBBQ7pn4AFWO4bSqCOHgGo6 P45tyUIGPXv87sqS/PGUZSD1IV3ypMzfNbxFnwII= 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.4 57/85] drm/vc4: drv: Add error handding for bind Date: Mon, 9 Nov 2020 13:55:54 +0100 Message-Id: <20201109125025.308973704@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201109125022.614792961@linuxfoundation.org> References: <20201109125022.614792961@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 5e6fb6c2307f0..0d78ba017a29b 100644 --- a/drivers/gpu/drm/vc4/vc4_drv.c +++ b/drivers/gpu/drm/vc4/vc4_drv.c @@ -309,6 +309,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