From patchwork Fri Mar 17 08:16:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 13178701 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 085B6C6FD1D for ; Fri, 17 Mar 2023 08:23:25 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 57B4F10EE80; Fri, 17 Mar 2023 08:23:23 +0000 (UTC) Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by gabe.freedesktop.org (Postfix) with ESMTPS id BBBE710EE74; Fri, 17 Mar 2023 08:23:02 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 3CBE1B824FB; Fri, 17 Mar 2023 08:23:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 63E07C4339C; Fri, 17 Mar 2023 08:22:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1679041380; bh=nglgtsvCUff3hoxAz81mxZbGLyBNAyLesQortl5pRh8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=V8QPGrUr1rKK/pkPnxyrGQHlhqrAhQAz9B8YoyGAyPlwfZjOEa/wZTrJiOl3B1f1V dRxVSsRurlfTpiX7NHysvBEo50rrhwV7ryieiJGGqt3l0mxDh3dkKl91U+uhHHlmDL 0tz+cX1m9mSmXzZmkZQkmFPlZkFgsko4Mi+8B8w1UKwQWvuLXGAbXEeX6FQLNqL48l 0FokY7w66TNZ/OEGX8XGJbVq9+UaUP9LnL/f1pCIthEt1N3HMwuu4l5CKiqHj3OZnk 4GXEw1Z+hA0hi4+teyF1NiENjb6p+qso5uJhJG3VUvfklp9SUzJNG0Tt0fjPFtUDc8 wi2RowAwAVwrw== From: Lee Jones To: lee@kernel.org, dri-devel@lists.freedesktop.org Subject: [PATCH 17/37] drm/amd/amdgpu/amdgpu_mes: Ensure amdgpu_bo_create_kernel()'s return value is checked Date: Fri, 17 Mar 2023 08:16:58 +0000 Message-Id: <20230317081718.2650744-18-lee@kernel.org> X-Mailer: git-send-email 2.40.0.rc1.284.g88254d51c5-goog In-Reply-To: <20230317081718.2650744-1-lee@kernel.org> References: <20230317081718.2650744-1-lee@kernel.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jack Xiao , "Pan, Xinhui" , linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, Sumit Semwal , linaro-mm-sig@lists.linaro.org, Alex Deucher , linux-media@vger.kernel.org, =?utf-8?q?Christian_K=C3=B6nig?= , Hawking Zhang Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c: In function ‘amdgpu_mes_ctx_alloc_meta_data’: drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c:1099:13: warning: variable ‘r’ set but not used [-Wunused-but-set-variable] Cc: Alex Deucher Cc: "Christian König" Cc: "Pan, Xinhui" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: Jack Xiao Cc: Hawking Zhang Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones --- drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c index 82e27bd4f0383..30cd72ca1eefd 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c @@ -1104,6 +1104,11 @@ int amdgpu_mes_ctx_alloc_meta_data(struct amdgpu_device *adev, &ctx_data->meta_data_obj, &ctx_data->meta_data_mc_addr, &ctx_data->meta_data_ptr); + if (r) { + dev_warn(adev->dev, "(%d) create CTX bo failed\n", r); + return r; + } + if (!ctx_data->meta_data_obj) return -ENOMEM;