Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2319932pxb; Mon, 20 Sep 2021 18:43:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyVqwyW8z9Y56kJibQp8vQek+7FE0bFJYrQj7z2zAXW8yZdgv33+A53ZGeiYsrEDOEdd+W5 X-Received: by 2002:a17:906:b2d3:: with SMTP id cf19mr32149161ejb.298.1632188605051; Mon, 20 Sep 2021 18:43:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632188605; cv=none; d=google.com; s=arc-20160816; b=FteQ7CggHipn65KslJn/WkiE5jiV9ZBSfU5mQc2BFLje4qeo7M5sWkA+Wfab5s50tV QOZjZjk8mNfQvA9lwie59F1qLN6hqC8AtVxfh1O4JhNubMVR5YxOzoQ54q40vILWAU4p 5LLWfV+jHwDrk2h/k1g9ooY06yCaIsmgiCNmPzs314LiAnpkcOTfY6KWb/51v5FF1ESy YoHeHVNu4ZMV3Y7tl3TOV67vdDPxIvr0NrgLhz6nliioX18474CCA9xynPKqWS9Dk/xZ hg9AvKiJA7T9itWPy1v2ObvvLDDC0fZFWYXt7Xg0QI1pvF06oQJ254cFCZnFEq9UPDW+ 37FA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=VrNpghY200908STNQNLMun9zxf0dnK6AApz8D2kQPSY=; b=GhqoOkrgaTb6TqAd2t/aFq0A2vG3ZNYKIB7G/CJwkdNPyXvok+5bXpKpjvsYfkL3vK NzdJxFYXma5id4A2m3DRYQjXoxGMdOcpSw9USjTglqElxhxoVkoJKd4FF3ofghYuZ3ZY g3izpL+N8/xMmWenEiGOroIK2qJP5HWrc+zdEQWr+nm3ysVtDzUEu3Uj7BjMovTnOo33 6Y5xYO5WpSpEac7fsTZKG0dk/DGzCnnlPKujVR0WlsNg3JPZsatiIF6G56LKzL63XJR0 WOMAlt6bqsk3BxnJtjRJ84T8CcprzCPxsS80rVLb/m9Z6ffnQq9eOX5NFytcJmNQsHtA kSvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Hqz92j1g; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x13si16423147edd.531.2021.09.20.18.43.01; Mon, 20 Sep 2021 18:43:25 -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=@linuxfoundation.org header.s=korg header.b=Hqz92j1g; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243299AbhITQs0 (ORCPT + 99 others); Mon, 20 Sep 2021 12:48:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:35746 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242994AbhITQrr (ORCPT ); Mon, 20 Sep 2021 12:47:47 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1B70961268; Mon, 20 Sep 2021 16:46:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632156380; bh=clXMKOQaOVCgNBc8yNDwl8dc99PObU2SUq/jp2khmFs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Hqz92j1giwk/NMvVksoF1+nIfzq7N9FjCHkH5mREqhdKfNSe2V8jHoLLdP/zdbTAN xrzzRoGT/yz2quigQ2h0toqWIiciaLuUaU8sd2vG5ctG6zUBxwKY0R1HFl1aRCQOf0 iAATJ43f7IXnoCUDerG1nJ6ZwplySgn7WKWguUC0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Giovanni Cabiddu , Marco Chiappero , Fiona Trahe , Herbert Xu , Sasha Levin Subject: [PATCH 4.4 033/133] crypto: qat - do not ignore errors from enable_vf2pf_comms() Date: Mon, 20 Sep 2021 18:41:51 +0200 Message-Id: <20210920163913.705812267@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210920163912.603434365@linuxfoundation.org> References: <20210920163912.603434365@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Giovanni Cabiddu [ Upstream commit 5147f0906d50a9d26f2b8698cd06b5680e9867ff ] The function adf_dev_init() ignores the error code reported by enable_vf2pf_comms(). If the latter fails, e.g. the VF is not compatible with the pf, then the load of the VF driver progresses. This patch changes adf_dev_init() so that the error code from enable_vf2pf_comms() is returned to the caller. Signed-off-by: Giovanni Cabiddu Reviewed-by: Marco Chiappero Reviewed-by: Fiona Trahe Signed-off-by: Herbert Xu Signed-off-by: Sasha Levin --- drivers/crypto/qat/qat_common/adf_init.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/qat/qat_common/adf_init.c b/drivers/crypto/qat/qat_common/adf_init.c index d873eeecc363..06b35edb0d43 100644 --- a/drivers/crypto/qat/qat_common/adf_init.c +++ b/drivers/crypto/qat/qat_common/adf_init.c @@ -121,6 +121,7 @@ int adf_dev_init(struct adf_accel_dev *accel_dev) struct service_hndl *service; struct list_head *list_itr; struct adf_hw_device_data *hw_data = accel_dev->hw_device; + int ret; if (!hw_data) { dev_err(&GET_DEV(accel_dev), @@ -187,9 +188,9 @@ int adf_dev_init(struct adf_accel_dev *accel_dev) } hw_data->enable_error_correction(accel_dev); - hw_data->enable_vf2pf_comms(accel_dev); + ret = hw_data->enable_vf2pf_comms(accel_dev); - return 0; + return ret; } EXPORT_SYMBOL_GPL(adf_dev_init); -- 2.30.2