Commit c52b6733 authored by Salvatore Benedetto's avatar Salvatore Benedetto Committed by Herbert Xu

crypto: qat - remove superfluous check from adf_probe

- ent->device is already checked at the beginning of the function
   against the same value. This check is a duplicate.
Signed-off-by: default avatarSalvatore Benedetto <salvatore.benedetto@intel.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent d956fed7
...@@ -253,13 +253,7 @@ static int adf_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -253,13 +253,7 @@ static int adf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
} }
accel_dev->hw_device = hw_data; accel_dev->hw_device = hw_data;
switch (ent->device) { adf_init_hw_data_dh895xcc(accel_dev->hw_device);
case ADF_DH895XCC_PCI_DEVICE_ID:
adf_init_hw_data_dh895xcc(accel_dev->hw_device);
break;
default:
return -ENODEV;
}
pci_read_config_byte(pdev, PCI_REVISION_ID, &accel_pci_dev->revid); pci_read_config_byte(pdev, PCI_REVISION_ID, &accel_pci_dev->revid);
pci_read_config_dword(pdev, ADF_DH895XCC_FUSECTL_OFFSET, pci_read_config_dword(pdev, ADF_DH895XCC_FUSECTL_OFFSET,
&hw_data->fuses); &hw_data->fuses);
......
...@@ -243,14 +243,7 @@ static int adf_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -243,14 +243,7 @@ static int adf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
goto out_err; goto out_err;
} }
accel_dev->hw_device = hw_data; accel_dev->hw_device = hw_data;
switch (ent->device) { adf_init_hw_data_dh895xcciov(accel_dev->hw_device);
case ADF_DH895XCCIOV_PCI_DEVICE_ID:
adf_init_hw_data_dh895xcciov(accel_dev->hw_device);
break;
default:
ret = -ENODEV;
goto out_err;
}
/* Get Accelerators and Accelerators Engines masks */ /* Get Accelerators and Accelerators Engines masks */
hw_data->accel_mask = hw_data->get_accel_mask(hw_data->fuses); hw_data->accel_mask = hw_data->get_accel_mask(hw_data->fuses);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment