From patchwork Mon Feb 1 16:08:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Insu Yun X-Patchwork-Id: 8185351 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 0810ABEEE5 for ; Tue, 2 Feb 2016 00:54:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3E4CD2028D for ; Tue, 2 Feb 2016 00:54:51 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 73680202AE for ; Tue, 2 Feb 2016 00:54:49 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A08E76E22E; Mon, 1 Feb 2016 16:54:48 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-yk0-f173.google.com (mail-yk0-f173.google.com [209.85.160.173]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7E32E6E310 for ; Mon, 1 Feb 2016 08:08:30 -0800 (PST) Received: by mail-yk0-f173.google.com with SMTP id u9so23282421ykd.1 for ; Mon, 01 Feb 2016 08:08:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=4CwJH2ldRp56MDWiLXs9k/gA8T4JSV0ARHME48dH2TM=; b=L6bTY4Lz9wyXS0w4ZXitt65f0GtW/BRg7/IIJszTLeLM26Hlur/BdJacPCtmhbrAiL 2rJggQol8YoEv/bzzNWhyB6bJx+dehhD4E9FYh3vzaacrlZIOIil8OHb4kMmzOxv5K/b eyu8Ldgmg4cFZOe7qpQTkVsLs2CrP42rbfakKiVtd0KRx4TAtzHIGfreFODYdZtTFZrp aOGN5ReQswFDHF2fGzRUu4M3V39Q5vLc8Hrtw+1fY6lAPXqnjUtnfdA9YblAydCANryn 8oO/Rar5zzmEzBsc56IP5ihw7KrrNdt+v/yjVC7EsV1dFdI8iyzzR1aDMnUPWvH9B1yM vs5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=4CwJH2ldRp56MDWiLXs9k/gA8T4JSV0ARHME48dH2TM=; b=Mf3fv+QohFSa1uBrHH9s9CKizZHkWYgiopCAaCmgf22+1RIfnBxqphnMtAJbl+ZYEj B5xRRXo87MscQ4rMj/Oo+j1OTxcR1DNEbyP9e8QqPq4mpkTzzqFqwhmPOUNRSBAhQn52 kAzTGkSjG38JAjf4N5T0bcCEOhNG18MFh52EHGbtkie18RCMWCEFxsnh+IR1ISaguH6J r0WHztfQ6Wd/ISv77JUb+rvF3TCIJae25tlmn8F3ZHFQWkmoz9yN4d4S+D0eWSIIqnmd XQi1VtNw0H0OXefnY86KK347A4TnY+UI+BUSiUhmAc+ZvUBZV0LicUBhsfLQYh8xMKxI gAsQ== X-Gm-Message-State: AG10YORaOt75/A8lADbSFdg2+cxUEJVJ78jaIXowWAVVNjPo9+rwFSD9Vuvu0zJl9HMcSg== X-Received: by 10.37.2.84 with SMTP id 81mr12458154ybc.15.1454342909563; Mon, 01 Feb 2016 08:08:29 -0800 (PST) Received: from insu.gtisc.gatech.edu (insu.gtisc.gatech.edu. [143.215.130.94]) by smtp.gmail.com with ESMTPSA id e4sm11145195ywb.0.2016.02.01.08.08.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 01 Feb 2016 08:08:29 -0800 (PST) From: Insu Yun To: airlied@linux.ie, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] drm: fix missing reference counting decrease Date: Mon, 1 Feb 2016 11:08:29 -0500 Message-Id: <1454342909-15327-1-git-send-email-wuninsu@gmail.com> X-Mailer: git-send-email 1.9.1 X-Mailman-Approved-At: Mon, 01 Feb 2016 16:54:48 -0800 Cc: yeongjin.jang@gatech.edu, taesoo@gatech.edu, insu@gatech.edu, Insu Yun , changwoo@gatech.edu X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In drm_dp_mst_allocate_vcpi, it returns true in two paths, but in one path, there is no reference couting decrease. Signed-off-by: Insu Yun --- drivers/gpu/drm/drm_dp_mst_topology.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c index 6ed90a2..fe273b6 100644 --- a/drivers/gpu/drm/drm_dp_mst_topology.c +++ b/drivers/gpu/drm/drm_dp_mst_topology.c @@ -2446,6 +2446,7 @@ bool drm_dp_mst_allocate_vcpi(struct drm_dp_mst_topology_mgr *mgr, struct drm_dp DRM_DEBUG_KMS("payload: vcpi %d already allocated for pbn %d - requested pbn %d\n", port->vcpi.vcpi, port->vcpi.pbn, pbn); if (pbn == port->vcpi.pbn) { *slots = port->vcpi.num_slots; + drm_dp_put_port(port); return true; } }