summaryrefslogtreecommitdiffstats
path: root/drivers/crypto
diff options
context:
space:
mode:
authorWu Fengguang <fengguang.wu@intel.com>2015-08-12 06:50:17 +0200
committerHerbert Xu <herbert@gondor.apana.org.au>2015-08-13 09:13:28 +0200
commit8669f34e122bad56e4d3ecde5f4720c40261bf4c (patch)
treec1a1dd736a614073cfd1ac453562d85fae475f78 /drivers/crypto
parentcrypto: qat - Fix unmet direct dependencies for QAT_DH895xCCVF (diff)
downloadlinux-8669f34e122bad56e4d3ecde5f4720c40261bf4c.tar.xz
linux-8669f34e122bad56e4d3ecde5f4720c40261bf4c.zip
crypto: qat - fix simple_return.cocci warnings
drivers/crypto/qat/qat_common/adf_sriov.c:258:1-4: WARNING: end returns can be simpified and declaration on line 212 can be dropped Simplify a trivial if-return sequence. Possibly combine with a preceding function call. Generated by: scripts/coccinelle/misc/simple_return.cocci CC: Tadeusz Struk <tadeusz.struk@intel.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto')
-rw-r--r--drivers/crypto/qat/qat_common/adf_sriov.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/crypto/qat/qat_common/adf_sriov.c b/drivers/crypto/qat/qat_common/adf_sriov.c
index a766fb59e71b..069b9ea55cfa 100644
--- a/drivers/crypto/qat/qat_common/adf_sriov.c
+++ b/drivers/crypto/qat/qat_common/adf_sriov.c
@@ -209,7 +209,7 @@ static int adf_enable_sriov(struct adf_accel_dev *accel_dev)
&GET_BARS(accel_dev)[hw_data->get_misc_bar_id(hw_data)];
void __iomem *pmisc_addr = pmisc->virt_addr;
struct adf_accel_vf_info *vf_info;
- int i, ret;
+ int i;
u32 reg;
/* Workqueue for PF2VF responses */
@@ -255,11 +255,7 @@ static int adf_enable_sriov(struct adf_accel_dev *accel_dev)
* order for all the hardware resources (i.e. bundles) to be usable.
* When SR-IOV is enabled, each of the VFs will own one bundle.
*/
- ret = pci_enable_sriov(pdev, totalvfs);
- if (ret)
- return ret;
-
- return 0;
+ return pci_enable_sriov(pdev, totalvfs);
}
/**