From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3E159A0562; Tue, 31 Mar 2020 12:23:14 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1AFEF2C6D; Tue, 31 Mar 2020 12:23:13 +0200 (CEST) Received: from huawei.com (szxga05-in.huawei.com [45.249.212.191]) by dpdk.org (Postfix) with ESMTP id 235D12C15 for ; Tue, 31 Mar 2020 12:23:10 +0200 (CEST) Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id D54DBFC1A0726A82A1ED; Tue, 31 Mar 2020 18:23:08 +0800 (CST) Received: from localhost (10.173.251.152) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.487.0; Tue, 31 Mar 2020 18:23:00 +0800 From: wangyunjian To: CC: , , , , Yunjian Wang Date: Tue, 31 Mar 2020 18:22:48 +0800 Message-ID: <1585650168-6372-1-git-send-email-wangyunjian@huawei.com> X-Mailer: git-send-email 1.9.5.msysgit.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.173.251.152] X-CFilter-Loop: Reflected Subject: [dpdk-dev] [PATCH] crypto/dpaa2_sec: remove unnecessary NULL check X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Yunjian Wang This NULL check is unnecessary, container_of is never NULL. Signed-off-by: Yunjian Wang --- drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 4 ---- 1 file changed, 4 deletions(-) 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; -- 2.19.1