crypto/dpaa2_sec: remove unnecessary check
authorYunjian Wang <wangyunjian@huawei.com>
Tue, 31 Mar 2020 10:22:48 +0000 (18:22 +0800)
committerAkhil Goyal <akhil.goyal@nxp.com>
Sun, 19 Apr 2020 15:15:14 +0000 (17:15 +0200)
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>
drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c

index 561b553..0919f3b 100644 (file)
@@ -3719,10 +3719,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;