Received: by 2002:ab2:6d45:0:b0:1fb:d597:ff75 with SMTP id d5csp43913lqr; Tue, 4 Jun 2024 20:25:57 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXMzku2u36qhc3XwpRAu9MU1OF1KttcGAYvJ/apUjAvXX2jVl4HPxx8OtlmuEcyIPzTTY68r3F9JTRmKz+781zhnPWT8lT8TB7MGovyNQ== X-Google-Smtp-Source: AGHT+IG+ykoScnvVPkuNCvoQfUWr1G4MnyyarDYp9e1TUYXILSwXM+pe0I2wRvbOropVtD8qMUlN X-Received: by 2002:a50:d5d3:0:b0:57a:7885:433d with SMTP id 4fb4d7f45d1cf-57a8bcb617emr743646a12.38.1717557957251; Tue, 04 Jun 2024 20:25:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717557957; cv=pass; d=google.com; s=arc-20160816; b=C3qKBIWTYFfuwvftyqgL0iJ7bFVgZ8cAbXy10ubKQYuKUQ/my2+srM9E6PRMJlWkfd D1OLE8McXiVtjVUcM0OanRbTekl8sx2o3PmT4mMhljmU6p+/z45TygOyX2NMBrRs96bp M3bjjwsqAD/ESrQCP3fMsq9Cr3ePqIVy2QHyJUB0Vwrc1CwIsJKNz8RnabM/kpW+/5hR wILAv53LJGoyU/BXk2/V7YA+LLeSxS4NubPU29ASZkzraijDVDp1DHNqTViXQ0bW/SWW g9hp9qHZDgTS7Vl0yaw75+lBJ6drjjJS6nCS7W8PsbaPtoVvwoyyUBF6yQwMxA67mObe QetA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=2Wv6g3jbyJRM5IzdJA4vtMiNvaCt+s968eGIAaAqsG0=; fh=0JItIs9otBlWGSgLj0Ebo/yDzZDmp6NsgUneE+yRkOA=; b=N5eVdiwQq4KyY9WfpYeRu184HfUg55a1oRZrNT1a2I/pEn+WwVX68CzFN0CmhC0FuY M3kD2HzzlAvP4rnyuxEsz6Sqwn8bBiPG9NRFvvNsnoRjIDOSCB4eajUz3UmaEVBUW6c5 NPa47sz09q744wWk9UbkxVrbnF9zJAa2nbGh1X/WHRdnZI2kIRbMK3F2yb+eknF2c2pz 2myNIc0z84sZYAdSb52UL2eyjVZ9I3D3gK1ZPwznQM0neFwO4DVlQZ4+oSytYfGl/GIR RNU+I3u9aWBPndIfqNW8jRkiXbU1wDylkXnyxp5ZjVBk4iUviPbbgwGAir1mmf7YoOtO rz5w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=iscas.ac.cn); spf=pass (google.com: domain of linux-crypto+bounces-4747-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-crypto+bounces-4747-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-57a31cc95c4si5688945a12.648.2024.06.04.20.25.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 20:25:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto+bounces-4747-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=iscas.ac.cn); spf=pass (google.com: domain of linux-crypto+bounces-4747-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-crypto+bounces-4747-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 0112C1F23CA4 for ; Wed, 5 Jun 2024 03:25:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9A80D12AAFD; Wed, 5 Jun 2024 03:25:37 +0000 (UTC) X-Original-To: linux-crypto@vger.kernel.org Received: from cstnet.cn (smtp81.cstnet.cn [159.226.251.81]) (using TLSv1.2 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 41A8F79DE; Wed, 5 Jun 2024 03:25:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.226.251.81 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717557937; cv=none; b=jERCPHxKChtxbjd6Ydfm/NF5z8mNcwTvGp7RL53VKtSxnjUKO/0EA2Vw3CPPMIEpG2YA97eamWhO84U8Zi8lgK4lZ7KXYulHYcutjyBAe5hmTb3ajk7KYZg7AV9BAIuDUHrOPWtRFB8fsFQzU/ytS2EBTeBNRif4rsGh1LAlKUw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717557937; c=relaxed/simple; bh=iar+ScYHyGbSpwqZk7GsbhYJzP4tfyU039xANgAKi8E=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=NMOJ9LsrOQDMrN/BZVdd4ui+d8ssYXgzeQhFeSqso1kjHZCts38lzJPbWI8ZC9RuT7qF3tfhrtOqPi978YYW1I2Aem3LrIWbTU44f3o/aQoH36/+Lm23QtRt8fo484EhPjN0s3dyOTv+xhBD6AErctwrq/nvZXM6T991l+uQ9yA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=iscas.ac.cn; spf=pass smtp.mailfrom=iscas.ac.cn; arc=none smtp.client-ip=159.226.251.81 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=iscas.ac.cn Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=iscas.ac.cn Received: from localhost (unknown [124.16.138.129]) by APP-03 (Coremail) with SMTP id rQCowADHzJA52V9mURJCDw--.61166S2; Wed, 05 Jun 2024 11:19:21 +0800 (CST) From: Chen Ni To: giovanni.cabiddu@intel.com, herbert@gondor.apana.org.au, davem@davemloft.net, markas.rapoportas@intel.com, ahsan.atta@intel.com, mun.chun.yep@intel.com, xin.zeng@intel.com Cc: qat-linux@intel.com, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, Chen Ni Subject: [PATCH] crypto: qat - add check for adf_cfg_add_key_value_param Date: Wed, 5 Jun 2024 11:18:35 +0800 Message-Id: <20240605031835.2916052-1-nichen@iscas.ac.cn> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID:rQCowADHzJA52V9mURJCDw--.61166S2 X-Coremail-Antispam: 1UD129KBjvdXoWrZrW3Jr15CFy7WrW5tw17Awb_yoWDWwb_Cr Z09ayaqryDCFn5Wrn8trWavrWj93s09ryruF1vvF4akasrGrsrKFykZr1DZF1Sqr1kWrn8 u3Zayr1kAw47XjkaLaAFLSUrUUUUjb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbVAFF20E14v26r4j6ryUM7CY07I20VC2zVCF04k26cxKx2IYs7xG 6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48ve4kI8w A2z4x0Y4vE2Ix0cI8IcVAFwI0_Gr0_Xr1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI0_Cr0_ Gr1UM28EF7xvwVC2z280aVAFwI0_Gr1j6F4UJwA2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_Cr 1j6rxdM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj 6xIIjxv20xvE14v26r106r15McIj6I8E87Iv67AKxVWUJVW8JwAm72CE4IkC6x0Yz7v_Jr 0_Gr1lF7xvr2IYc2Ij64vIr41lF7I21c0EjII2zVCS5cI20VAGYxC7M4IIrI8v6xkF7I0E 8cxan2IY04v7MxkIecxEwVAFwVW8GwCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbV WUJVW8JwC20s026c02F40E14v26r1j6r18MI8I3I0E7480Y4vE14v26r106r1rMI8E67AF 67kF1VAFwI0_Jw0_GFylIxkGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVWUJVWUCwCI42 IY6xIIjxv20xvEc7CjxVAFwI0_Gr0_Cr1lIxAIcVCF04k26cxKx2IYs7xG6r1j6r1xMIIF 0xvEx4A2jsIE14v26r1j6r4UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Gr0_Gr1UYxBIdaVFxh VjvjDU0xZFpf9x0JUk3ktUUUUU= X-CM-SenderInfo: xqlfxv3q6l2u1dvotugofq/ Add check for the return value of adf_cfg_add_key_value_param() and return the error if it fails in order to catch the error. Fixes: 4469f9b23468 ("crypto: qat - re-enable sriov after pf reset") Signed-off-by: Chen Ni --- drivers/crypto/intel/qat/qat_common/adf_sriov.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/crypto/intel/qat/qat_common/adf_sriov.c b/drivers/crypto/intel/qat/qat_common/adf_sriov.c index 8d645e7e04aa..30ff9097f527 100644 --- a/drivers/crypto/intel/qat/qat_common/adf_sriov.c +++ b/drivers/crypto/intel/qat/qat_common/adf_sriov.c @@ -228,8 +228,10 @@ int adf_sriov_configure(struct pci_dev *pdev, int numvfs) return ret; val = 1; - adf_cfg_add_key_value_param(accel_dev, ADF_GENERAL_SEC, ADF_SRIOV_ENABLED, + ret = adf_cfg_add_key_value_param(accel_dev, ADF_GENERAL_SEC, ADF_SRIOV_ENABLED, &val, ADF_DEC); + if (ret) + return ret; return numvfs; } -- 2.25.1