From patchwork Wed Nov 15 15:09:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Biju Das X-Patchwork-Id: 13456913 X-Patchwork-Delegate: kieran@bingham.xyz Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E6E8FCDB47E for ; Wed, 15 Nov 2023 15:09:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343952AbjKOPJn (ORCPT ); Wed, 15 Nov 2023 10:09:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55242 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344364AbjKOPJn (ORCPT ); Wed, 15 Nov 2023 10:09:43 -0500 Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A8AAE8E for ; Wed, 15 Nov 2023 07:09:39 -0800 (PST) X-IronPort-AV: E=Sophos;i="6.03,305,1694703600"; d="scan'208";a="186884608" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 16 Nov 2023 00:09:38 +0900 Received: from localhost.localdomain (unknown [10.226.92.200]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 9A5B140071E6; Thu, 16 Nov 2023 00:09:35 +0900 (JST) From: Biju Das To: David Airlie , Daniel Vetter Cc: Biju Das , Laurent Pinchart , Kieran Bingham , Jacopo Mondi , dri-devel@lists.freedesktop.org, linux-renesas-soc@vger.kernel.org, Geert Uytterhoeven , Prabhakar Mahadev Lad , Biju Das Subject: [PATCH] drm: rcar-du: Fix memory leak in rcar_du_vsps_init() Date: Wed, 15 Nov 2023 15:09:32 +0000 Message-Id: <20231115150932.107796-1-biju.das.jz@bp.renesas.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org The rcar_du_vsps_init() doesn't free the np allocated by of_parse_phandle_with_fixed_args() for the non-error case. Fix memory leak for the non-error case. Fixes: 3e81374e2014 ("drm: rcar-du: Support multiple sources from the same VSP") Signed-off-by: Biju Das --- drivers/gpu/drm/renesas/rcar-du/rcar_du_kms.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/renesas/rcar-du/rcar_du_kms.c b/drivers/gpu/drm/renesas/rcar-du/rcar_du_kms.c index 70d8ad065bfa..5cd54ea33313 100644 --- a/drivers/gpu/drm/renesas/rcar-du/rcar_du_kms.c +++ b/drivers/gpu/drm/renesas/rcar-du/rcar_du_kms.c @@ -747,8 +747,6 @@ static int rcar_du_vsps_init(struct rcar_du_device *rcdu) goto error; } - return 0; - error: for (i = 0; i < ARRAY_SIZE(vsps); ++i) of_node_put(vsps[i].np);