Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp1145470pxv; Fri, 9 Jul 2021 19:27:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz7BfYeuugPVZIqyKxEUOcmpLdHOH+SbpLN9QBljutFTuPDnDZzWFpVCsipYQDYYBOq4xO7 X-Received: by 2002:a05:6402:270d:: with SMTP id y13mr9146237edd.66.1625884054266; Fri, 09 Jul 2021 19:27:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625884054; cv=none; d=google.com; s=arc-20160816; b=r8PGPcD8XCGnAbJjZoAFNn3wgpTl8dIK6tuAmZhM6qbYgaqjkM2glTzswRRIdPl9DK Z/qPZ6x9mpLwgwckXu87hkZQ/Yp4WRBWwF9y3XCLvdxonZwkEimqfH0ve9ypFJVAgWnx CkPmYOMuOKYui6ClWxjAecx0KB/8/E+lUIRmf22GRCvfyMVTej14NV3ZDikSMprsAgvB ziQRBlFMfU2YQ+ZKvVmhwmXuz+hOugoVk6WpsUPxy4tQ09/5Fxgt51PmZVFpIM2c3aJ0 msXDDEdJqlCSmq/rmZJ2nMM7QPr924sdYJYwyM8yqwPnoqQTpAcjkriMDXzbweo1hg2m YvPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=nGzx4vprAJkbwEY7TbfHAF0MvyyhAwUdikXPQWl0/Jg=; b=ZmRLzpEdw5FndCodgac2Wifx+ZMMldMQlUMn6/edExoUnC49lLnnMSfkQq1X84oA7x h4g6KHuitolPATvrpEeAamBicGO/ko2ojOBZGBDgM7Grzm4U+YrDnyoaoN/KJILIlsXT VtnDy8YWP6MmMu89bvq7r24bx6aYSaWDxAdCe37zPtbxnvjH+uKk5BjCSUN3onFKPT9q mg0QIm8AGDTzs8GmxxEen2KIpbeEuznIHvswPx4CER598vSw/NRz8Dhhzp0mTEEHyh7v PEOZK+R3fb1Q6bznqdTQUeMMRNzWrtlbDKPQqP7ecez3zdVqRo4ATf4RLpWoKA7UjNDk SG4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RwfaOGyW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f18si3437686ejh.710.2021.07.09.19.27.11; Fri, 09 Jul 2021 19:27:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RwfaOGyW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233925AbhGJC16 (ORCPT + 99 others); Fri, 9 Jul 2021 22:27:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:42616 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233379AbhGJC0i (ORCPT ); Fri, 9 Jul 2021 22:26:38 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E772D613EC; Sat, 10 Jul 2021 02:23:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1625883829; bh=bTYqlpNdoAoSEPSHIyiL4RKxHJprX5EKA4dt7923Zoo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RwfaOGyWyTvvPikeZVgvby4f37b6vTiqzDbybXfpUaQJ7WcMIFhc3NfYYVFQIeJO0 2dA06YaW1tfyQ9b569YKQw346iiRSrvFJo142N+2Yarzq1QfQhnBJi1ZdqUF8O2uvg WwIXTPmhpnsfWNHWlVBvUzR5zin8W9YwOJnXbXT/tcTuXYtDBs9tc81ZlXuVPtVpEh kDKPjRTgobktxvf1/dXDLBVVQ/v2095rd8VhRF9mgzBgI1MiT3poDU7+u29hZoDZ48 1SYm807OtXuKjfb3XGtv71bFaFquPhD/9jEPEAemDQMJAQxLUdDMNVlYhrOO395MbV hQpZOZVmuH/WQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Koby Elbaz , Oded Gabbay , Sasha Levin Subject: [PATCH AUTOSEL 5.12 077/104] habanalabs/gaudi: set the correct rc in case of err Date: Fri, 9 Jul 2021 22:21:29 -0400 Message-Id: <20210710022156.3168825-77-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210710022156.3168825-1-sashal@kernel.org> References: <20210710022156.3168825-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Koby Elbaz [ Upstream commit 1f7ef4bf41c7c2abad3d21b8c69db11fc3ebc4f5 ] fix the following smatch warnings: gaudi_internal_cb_pool_init() warn: missing error code 'rc' Signed-off-by: Koby Elbaz Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay Signed-off-by: Sasha Levin --- drivers/misc/habanalabs/gaudi/gaudi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/misc/habanalabs/gaudi/gaudi.c b/drivers/misc/habanalabs/gaudi/gaudi.c index 0c6092ebbc04..894056da22cf 100644 --- a/drivers/misc/habanalabs/gaudi/gaudi.c +++ b/drivers/misc/habanalabs/gaudi/gaudi.c @@ -8070,8 +8070,10 @@ static int gaudi_internal_cb_pool_init(struct hl_device *hdev, HL_VA_RANGE_TYPE_HOST, HOST_SPACE_INTERNAL_CB_SZ, HL_MMU_VA_ALIGNMENT_NOT_NEEDED); - if (!hdev->internal_cb_va_base) + if (!hdev->internal_cb_va_base) { + rc = -ENOMEM; goto destroy_internal_cb_pool; + } mutex_lock(&ctx->mmu_lock); rc = hl_mmu_map_contiguous(ctx, hdev->internal_cb_va_base, -- 2.30.2