summaryrefslogtreecommitdiff
path: root/drivers/crypto/qat
diff options
context:
space:
mode:
authorWang Yufen <wangyufen@huawei.com>2022-11-21 14:27:34 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2022-12-02 13:12:39 +0300
commit31f81401e23fb88cc030cd586abd28740e6c8136 (patch)
tree17fa7fa768f488c347f207b6b29b9dc006a0df98 /drivers/crypto/qat
parent83478938f78fd640c72af83d739a90c840e1b876 (diff)
downloadlinux-31f81401e23fb88cc030cd586abd28740e6c8136.tar.xz
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@huawei.com> Acked-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/qat')
-rw-r--r--drivers/crypto/qat/qat_4xxx/adf_drv.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/crypto/qat/qat_4xxx/adf_drv.c b/drivers/crypto/qat/qat_4xxx/adf_drv.c
index 2f212561acc4..670a58b25cb1 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;
}