From patchwork Thu Jul 15 18:38:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 478186 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=-19.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,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 5E807C636CA for ; Thu, 15 Jul 2021 18:53:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4B3A9613E0 for ; Thu, 15 Jul 2021 18:53:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241636AbhGOS4P (ORCPT ); Thu, 15 Jul 2021 14:56:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:60090 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241769AbhGOSzz (ORCPT ); Thu, 15 Jul 2021 14:55:55 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0D222613D0; Thu, 15 Jul 2021 18:53:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626375181; bh=gNsi4EIxhYmRpvHNddMeznVhuB3sZHL0WArFcs/Ycwc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VFwG8utkogu6eshh+jb/UDmkuA80WcCxACNNgmONdC12A+IvSB7WCa3jq6kjvt+um 3V0xRyvVd+hdqg6uk86FJJhzxYIIYYFbzR9VNXAUN/hq6Caesv1zkHgQaktSeE+C1i ubg34OYUQaV3hjHaKQecJdVTtUxoq6VG62qT/l2o= 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.10 151/215] drm/radeon: Add the missed drm_gem_object_put() in radeon_user_framebuffer_create() Date: Thu, 15 Jul 2021 20:38:43 +0200 Message-Id: <20210715182626.291774548@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210715182558.381078833@linuxfoundation.org> References: <20210715182558.381078833@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 @@ -1334,6 +1334,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); }