[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1669030054-9605-1-git-send-email-wangyufen@huawei.com>
Date: Mon, 21 Nov 2022 19:27:34 +0800
From: Wang Yufen <wangyufen@...wei.com>
To: <giovanni.cabiddu@...el.com>, <herbert@...dor.apana.org.au>,
<davem@...emloft.net>, <marco.chiappero@...el.com>
CC: <tomaszx.kowalik@...el.com>, <qat-linux@...el.com>,
<linux-crypto@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
Wang Yufen <wangyufen@...wei.com>
Subject: [PATCH] crypto: qat - fix error return code in adf_probe
Fix to return a negative error code -EINVAL instead of 0.
Fixes: 0cec19c761e5 ("crypto: qat - add support for compression for 4xxx")
Signed-off-by: Wang Yufen <wangyufen@...wei.com>
---
drivers/crypto/qat/qat_4xxx/adf_drv.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/crypto/qat/qat_4xxx/adf_drv.c b/drivers/crypto/qat/qat_4xxx/adf_drv.c
index 2f21256..670a58b2 100644
--- a/drivers/crypto/qat/qat_4xxx/adf_drv.c
+++ b/drivers/crypto/qat/qat_4xxx/adf_drv.c
@@ -261,6 +261,7 @@ static int adf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
hw_data->accel_capabilities_mask = hw_data->get_accel_cap(accel_dev);
if (!hw_data->accel_capabilities_mask) {
dev_err(&pdev->dev, "Failed to get capabilities mask.\n");
+ ret = -EINVAL;
goto out_err;
}
--
1.8.3.1
Powered by blists - more mailing lists