diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2021-10-04 14:59:33 +0200 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2021-10-12 17:37:15 -0500 |
commit | 8f5c335e34b5ae2dda6db2af300381fc9fb53fe7 (patch) | |
tree | 51265d6bdd2f5307b80a97355a1865cdad57c30c /drivers/crypto/qat/qat_dh895xcc | |
parent | a534ff3f4d6082f5ac228194accb7b414f0d6f0b (diff) | |
download | linux-stable-8f5c335e34b5ae2dda6db2af300381fc9fb53fe7.tar.gz linux-stable-8f5c335e34b5ae2dda6db2af300381fc9fb53fe7.tar.bz2 linux-stable-8f5c335e34b5ae2dda6db2af300381fc9fb53fe7.zip |
crypto: qat - simplify adf_enable_aer()
A struct pci_driver is shared across all device instances, so assigning
pci_driver.err_handler once per device isn't really sensible.
Set adf_driver.err_handler statically instead of in adf_enable_aer().
This removes a use of pci_dev->driver, which is a step toward removing
pci_dev->driver altogether.
Since adf_enable_aer() returns zero unconditionally, make it a void
function.
Link: https://lore.kernel.org/r/20211004125935.2300113-10-u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/crypto/qat/qat_dh895xcc')
-rw-r--r-- | drivers/crypto/qat/qat_dh895xcc/adf_drv.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/crypto/qat/qat_dh895xcc/adf_drv.c b/drivers/crypto/qat/qat_dh895xcc/adf_drv.c index 3976a81bd99b..acca56752aa0 100644 --- a/drivers/crypto/qat/qat_dh895xcc/adf_drv.c +++ b/drivers/crypto/qat/qat_dh895xcc/adf_drv.c @@ -33,6 +33,7 @@ static struct pci_driver adf_driver = { .probe = adf_probe, .remove = adf_remove, .sriov_configure = adf_sriov_configure, + .err_handler = &adf_err_handler, }; static void adf_cleanup_pci_dev(struct adf_accel_dev *accel_dev) @@ -192,11 +193,7 @@ static int adf_probe(struct pci_dev *pdev, const struct pci_device_id *ent) } pci_set_master(pdev); - if (adf_enable_aer(accel_dev)) { - dev_err(&pdev->dev, "Failed to enable aer\n"); - ret = -EFAULT; - goto out_err_free_reg; - } + adf_enable_aer(accel_dev); if (pci_save_state(pdev)) { dev_err(&pdev->dev, "Failed to save pci state\n"); |