From patchwork Thu Apr 4 07:32:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 13617379 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7E2FFCD1284 for ; Thu, 4 Apr 2024 07:32:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Subject:Cc:To: From:Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=vFZB6VXm74+3+zehb076cl/qN+NTAzb2T+OD03V7bHE=; b=2fPThNrxv0BiS4 GuGngqjTm0nJdDFUW095UFPx0v9+Y2Vw+hivn+sarmY3I7m1df9vPCVrl4rpcrfkhf884ksakqR+x GIjx3KcBUfVcxdCwa5+ct0nfC++E6gKHsq0GVVzLvAmQx3iFIhEiGzLqKC9ohmj9QLH5e88rEvUTZ mK4YMzadJdR6irE8pHGR0pSOpfTwJZJBvZhEAGekJQcLgW4Y+aiKRZHE8MK3Y0YeHYdrUiX7go66m Ts+2mhjdgCu8wj1V5kljEDJhQ7SIeaSX8Nr0fRCCiRELWpLajMXzM42io1Ej7WIb9kFypHmWebAnl SKOe1uTXM/MnKqmz8lMQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rsHa5-00000001eLv-3VJW; Thu, 04 Apr 2024 07:32:17 +0000 Received: from mail-ed1-x533.google.com ([2a00:1450:4864:20::533]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rsHa3-00000001eKF-0kQO for linux-arm-kernel@lists.infradead.org; Thu, 04 Apr 2024 07:32:16 +0000 Received: by mail-ed1-x533.google.com with SMTP id 4fb4d7f45d1cf-56e22574eb3so42523a12.3 for ; Thu, 04 Apr 2024 00:32:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1712215931; x=1712820731; darn=lists.infradead.org; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=//sAcOVGiFM67Mc+7u0Jl/+UyvrH+ecyO1z9cymLgoc=; b=gKFW9Nxhx0z+a5KyVysDwN3edI473E6fDrPwlPdRGUaK6C3ikpy22dfnD1YrSft/3B 0yJ6+DRyyi1j9u5ae72N397JLgxn38YBxiKSaTBl2nnIeVMBcKhNKEJJ9LXr0fFIudyF 7pxz3ypIMUp/VOoIsRbmijg9ZiiP/ihizcgpY+cpOJ9nmG2ioIdzY5ES+U4Q8prIKVxv roVhfrdQUoq/DYCKUeT1OR6W2F+6KGc2o3mOe84gBAqUTqULOHOLR12JSq8YodyT0wLF 8FzOT3NmyuC21frFlUqqaSVvGlDCCyehDDq8to0SGm7dlsu8DQpyAXVM0DBaQAPZmmy/ bRhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712215931; x=1712820731; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=//sAcOVGiFM67Mc+7u0Jl/+UyvrH+ecyO1z9cymLgoc=; b=H9bG0NkK34+HRzjT8SSSSlfKiXl+/LYvjVBCjYlzC9sk5cMzKVDK69b4l8x/Pf27SI M4mnmwkKDM5RFe7ppJvvSDWqgETZBUsBjgBW5PvrUTKSW7bLDWXj9t0jbzwBGHGwaCs1 MMZY7BPUIYBwqTNTHnDuWdOUlAsobPOC1x8A03lB6mB+0DhbJTZSwcGpCa80BNMH1Eee ySlfwSdjVnnzpDURWL0KaUzkIhFAt294CgXHYTHGnb0xkHMRWP5nRMc4KJ4siGtQHXdt dNtKwizUFnz4Wf2yLLSehRoEHuOOrzBA95of1RFcTcKzGkdL2L63qXXvag3JqNVbXZFi 7dQw== X-Forwarded-Encrypted: i=1; AJvYcCVe3Jykc2UaYXfjiNwqha3RRVnxLjRmXZwVvxwLh7T94ZBxTjfgOPEbihBluNHfnlegTNbsE3zDfAqb09eBfw1oSbOywZKVL+lIsckP7+WBSuk1BL4= X-Gm-Message-State: AOJu0YwcL1YNJPrXTlQ2lT0aeNobVkazhw+UKJy+O6ib1w/9VJJCdwvY WCjpE7TMMJjzLNS6H8oUjjsFcP0N25kuWMaMFMX5ODtIvJ2PBM6Cb4fXTEZp1k8= X-Google-Smtp-Source: AGHT+IHGoMQHATjr9mp/W1xlbFnASpGskQs04R+ZSL+kTmOQTHyHF5yua8U3fbJLoFFE5vCnaPng5A== X-Received: by 2002:a50:8add:0:b0:56d:ee61:6874 with SMTP id k29-20020a508add000000b0056dee616874mr1078667edk.20.1712215931473; Thu, 04 Apr 2024 00:32:11 -0700 (PDT) Received: from localhost ([102.222.70.76]) by smtp.gmail.com with ESMTPSA id s2-20020aa7cb02000000b0056c0d96e099sm8845373edt.89.2024.04.04.00.32.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 00:32:11 -0700 (PDT) Date: Thu, 4 Apr 2024 10:32:07 +0300 From: Dan Carpenter To: Rohit Visavalia Cc: Laurent Pinchart , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Michal Simek , Vishal Sagar , Tomi Valkeinen , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH] drm: xlnx: db: fix a memory leak in probe Message-ID: <86def134-9537-4939-912e-3a424e3a75b6@moroto.mountain> MIME-Version: 1.0 Content-Disposition: inline X-Mailer: git-send-email haha only kidding X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240404_003215_235389_43AB67A5 X-CRM114-Status: GOOD ( 11.52 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Free "dp" before returning. Fixes: be318d01a903 ("drm: xlnx: dp: Reset DisplayPort IP") Signed-off-by: Dan Carpenter --- drivers/gpu/drm/xlnx/zynqmp_dp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/xlnx/zynqmp_dp.c b/drivers/gpu/drm/xlnx/zynqmp_dp.c index 5a40aa1d4283..8a15d18a65a6 100644 --- a/drivers/gpu/drm/xlnx/zynqmp_dp.c +++ b/drivers/gpu/drm/xlnx/zynqmp_dp.c @@ -1716,7 +1716,7 @@ int zynqmp_dp_probe(struct zynqmp_dpsub *dpsub) ret = zynqmp_dp_reset(dp, true); if (ret < 0) - return ret; + goto err_free; ret = zynqmp_dp_reset(dp, false); if (ret < 0)