crypto/dpaa2_sec: remove unnecessary NULL check
diff mbox series

Message ID 1585650168-6372-1-git-send-email-wangyunjian@huawei.com
State Accepted, archived
Delegated to: akhil goyal
Headers show
Series
  • crypto/dpaa2_sec: remove unnecessary NULL check
Related show

Checks

Context Check Description
ci/travis-robot success Travis build: passed
ci/Intel-compilation success Compilation OK
ci/iol-testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/checkpatch success coding style OK

Commit Message

wangyunjian March 31, 2020, 10:22 a.m. UTC
From: Yunjian Wang <wangyunjian@huawei.com>

This NULL check is unnecessary, container_of is never NULL.

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
---
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 4 ----
 1 file changed, 4 deletions(-)

Comments

Akhil Goyal April 15, 2020, 6:17 p.m. UTC | #1
> 
> From: Yunjian Wang <wangyunjian@huawei.com>
> 
> This NULL check is unnecessary, container_of is never NULL.
> 
> Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
> ---
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Akhil Goyal April 17, 2020, 9:03 p.m. UTC | #2
> >
> > From: Yunjian Wang <wangyunjian@huawei.com>
> >
> > This NULL check is unnecessary, container_of is never NULL.
> >
> > Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
> > ---
> Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Applied to dpdk-next-crypto

Thanks

Patch
diff mbox series

diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index 6ed2701ab..4d3b93cdd 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -3729,10 +3729,6 @@  dpaa2_sec_dev_init(struct rte_cryptodev *cryptodev)
 
 	PMD_INIT_FUNC_TRACE();
 	dpaa2_dev = container_of(dev, struct rte_dpaa2_device, device);
-	if (dpaa2_dev == NULL) {
-		DPAA2_SEC_ERR("DPAA2 SEC device not found");
-		return -1;
-	}
 	hw_id = dpaa2_dev->object_id;
 
 	cryptodev->driver_id = cryptodev_driver_id;