crypto: qat - remove superfluous check from adf_probe
authorSalvatore Benedetto <salvatore.benedetto@intel.com>
Thu, 22 Oct 2015 14:23:12 +0000 (15:23 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Tue, 17 Nov 2015 13:58:37 +0000 (21:58 +0800)
- ent->device is already checked at the beginning of the function
   against the same value. This check is a duplicate.

Signed-off-by: Salvatore Benedetto <salvatore.benedetto@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/qat/qat_dh895xcc/adf_drv.c
drivers/crypto/qat/qat_dh895xccvf/adf_drv.c

index f8dd14f232c83bffee35a2f096cd13dd88cd15dd..f933f7da3cdb57dbb357a49b28328e8ae344fce7 100644 (file)
@@ -253,13 +253,7 @@ static int adf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
        }
 
        accel_dev->hw_device = hw_data;
-       switch (ent->device) {
-       case ADF_DH895XCC_PCI_DEVICE_ID:
-               adf_init_hw_data_dh895xcc(accel_dev->hw_device);
-               break;
-       default:
-               return -ENODEV;
-       }
+       adf_init_hw_data_dh895xcc(accel_dev->hw_device);
        pci_read_config_byte(pdev, PCI_REVISION_ID, &accel_pci_dev->revid);
        pci_read_config_dword(pdev, ADF_DH895XCC_FUSECTL_OFFSET,
                              &hw_data->fuses);
index 789426f2188224bf7d33241c5b8fa90dfad2c57e..7bec249afdb9bc0c1ef21863631001074d71af1c 100644 (file)
@@ -243,14 +243,7 @@ static int adf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
                goto out_err;
        }
        accel_dev->hw_device = hw_data;
-       switch (ent->device) {
-       case ADF_DH895XCCIOV_PCI_DEVICE_ID:
-               adf_init_hw_data_dh895xcciov(accel_dev->hw_device);
-               break;
-       default:
-               ret = -ENODEV;
-               goto out_err;
-       }
+       adf_init_hw_data_dh895xcciov(accel_dev->hw_device);
 
        /* Get Accelerators and Accelerators Engines masks */
        hw_data->accel_mask = hw_data->get_accel_mask(hw_data->fuses);