Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp115277pxb; Mon, 13 Sep 2021 14:32:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzRsoftOWe2sUpuaez6yJihGaPJS+m+GPhYaISw71RFmV2GqYoTFv5WfjfRb9UewohKpqza X-Received: by 2002:a17:906:3486:: with SMTP id g6mr15510235ejb.71.1631568763651; Mon, 13 Sep 2021 14:32:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631568763; cv=none; d=google.com; s=arc-20160816; b=ZiFtPRcdMBvfhPKAyJatjV6P0Vrx4CwsZAt8m8vjoHeNVH3Qmgdwk6tBNkhqKdp2SR VuW+V7q1l5ctqh9ZAUSBwxGVvquD32iZ0sy+OLVQG6fga3o7FZm6b2SZDCet4nIYx0gI xNj277qmO/i+z+mlZqQ8VPVXPog31vLt8SUGxaVdG1J91ejJF9bN6E251mKcAG8NZyyW g9fwkNDYyEjX3dg+8QgVgDT1cXQvl0KAket1eFJaouHSqeIcqh55mfljG+VgwLCSUhLP 1tKCIdb5iLa/y3xbRtR3QklN4Myhrqb36kDcHB56bJiGKRygYMsCXODd1vxn53c045vV iR0A== 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=z7d7LOpmLb2d9u4ZFlJt+QHcVdPKHbZyEoyvZ76pkSE=; b=aHfAQ7f9XssTb3XTgq5mS45iiYlLjvEVdHLkf/7JPn0qny4ATPQnCy3nzIqiLG8b1c JYJraN48tRxDOuB1+qFDQZnlmr2VjxzytLfeFfBsqJUH/JCNlQESC9L7QDb7M6FMtgiP 6PwqTxRKfy3Cf2TorkHjx36ods743lu5B6/o8qGrRiujvr4ZzEesckI8mf2gKKKgANly wAiTryp/ccD8VSUwLjHGBqGYPouuz0vdBR10XiWhRdQUaEmzJd4U+dtoH0xyKKg0uJjG nPQwt0flTqVzPFTy4SSUSfcfbVLzjMuirv59pDowmCMkMEbBGXkRM1HO3XPFFOQMaSQW 91aQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=NnMD0ou2; 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 18si11378396ejc.508.2021.09.13.14.32.20; Mon, 13 Sep 2021 14:32:43 -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=NnMD0ou2; 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 S242910AbhIMNzV (ORCPT + 99 others); Mon, 13 Sep 2021 09:55:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:56780 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243324AbhIMNvg (ORCPT ); Mon, 13 Sep 2021 09:51:36 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id DE07C6138E; Mon, 13 Sep 2021 13:34:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631540049; bh=zc6OHHgdY1q0VOzMawMuRHooyQ8mTXK/lwqpqDfksyQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NnMD0ou21eQQU8Up+g7lvGAbjCqgy8HTJGu8q5HUOqK4kP5CejFEUahJjRDOIJFYq 4+vr+E8Yzswwd5q/6zsEpgHkMdKddHf7MMDfj/72JuNka+cKldj0nkcKfxwqxYYiCg WKyh8dyiMfaqUwdqPyoCF00L1+lqf2mmIrYVzxkE= 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 5.13 030/300] crypto: qat - do not ignore errors from enable_vf2pf_comms() Date: Mon, 13 Sep 2021 15:11:31 +0200 Message-Id: <20210913131110.336542535@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913131109.253835823@linuxfoundation.org> References: <20210913131109.253835823@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 744c40351428..02864985dbb0 100644 --- a/drivers/crypto/qat/qat_common/adf_init.c +++ b/drivers/crypto/qat/qat_common/adf_init.c @@ -61,6 +61,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), @@ -127,9 +128,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