From patchwork Thu Jul 15 18:39:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 477957 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2C73AC63799 for ; Thu, 15 Jul 2021 19:13:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0D4AB61410 for ; Thu, 15 Jul 2021 19:13:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244388AbhGOTP6 (ORCPT ); Thu, 15 Jul 2021 15:15:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:51194 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244626AbhGOTO7 (ORCPT ); Thu, 15 Jul 2021 15:14:59 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3093361403; Thu, 15 Jul 2021 19:10:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626376250; bh=gM0qQjh02t3B7lTxHS0YCfVSk5RMjCGn9lYfp+b94e0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Fqvg3+LDE/iOFHuxCMr+bMqbKMBzvKfCgOc/AUbUBf8VVAE4zi5faA2FSHbhS4nHf 9PU3YPXhAuEM0+sq8hIat5M1k4goXVfGpLLMqiM/F55tQGZXleFbC7wnKqWzmHaxJP Lqw76dj7bi+yKjRKFr8vnUeNRf36u6mB06O3uUDg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?utf-8?q?Christian_K=C3=B6nig?= , Jing Xiangfeng , Alex Deucher Subject: [PATCH 5.13 190/266] drm/radeon: Add the missed drm_gem_object_put() in radeon_user_framebuffer_create() Date: Thu, 15 Jul 2021 20:39:05 +0200 Message-Id: <20210715182644.525275517@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210715182613.933608881@linuxfoundation.org> References: <20210715182613.933608881@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Jing Xiangfeng commit 9ba85914c36c8fed9bf3e8b69c0782908c1247b7 upstream. radeon_user_framebuffer_create() misses to call drm_gem_object_put() in an error path. Add the missed function call to fix it. Reviewed-by: Christian König Signed-off-by: Jing Xiangfeng Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/radeon/radeon_display.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/gpu/drm/radeon/radeon_display.c +++ b/drivers/gpu/drm/radeon/radeon_display.c @@ -1325,6 +1325,7 @@ radeon_user_framebuffer_create(struct dr /* Handle is imported dma-buf, so cannot be migrated to VRAM for scanout */ if (obj->import_attach) { DRM_DEBUG_KMS("Cannot create framebuffer from imported dma_buf\n"); + drm_gem_object_put(obj); return ERR_PTR(-EINVAL); }