From patchwork Tue Oct 4 08:00:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Marchand X-Patchwork-Id: 117280 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B7613A0543; Tue, 4 Oct 2022 10:00:45 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A16FC40DDC; Tue, 4 Oct 2022 10:00:44 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 86FC040A87 for ; Tue, 4 Oct 2022 10:00:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1664870443; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cNhMe7aIHNBiojr3KpDvK0V6mbzj6Npo0yEYBv8oAX4=; b=G4esR9KmJ/09PDWO4lCyEGlkER5xAuZofjK9ayS2FCGmfOIBa8tDoeDGwhYtC64xtf6Sse 9JD3T5wwND7TePNSDR1ce10avy+xhiF72ZLIoKSvZ/qh3j/hvqzQNPr4WcrKx/I3TLGwIJ uH+MtvToMVlP4EEXjEfmhvzMzuUY2FQ= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-331-JkRucR2IPmiglbq5JCCFFg-1; Tue, 04 Oct 2022 04:00:39 -0400 X-MC-Unique: JkRucR2IPmiglbq5JCCFFg-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6E041299E750; Tue, 4 Oct 2022 08:00:39 +0000 (UTC) Received: from localhost.localdomain (unknown [10.40.195.42]) by smtp.corp.redhat.com (Postfix) with ESMTP id A3A064EA4E; Tue, 4 Oct 2022 08:00:38 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: Sachin Saxena , Hemant Agrawal Subject: [PATCH] raw/skeleton: remove useless check Date: Tue, 4 Oct 2022 10:00:26 +0200 Message-Id: <20221004080026.180919-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org As reported by Coverity, this check is pointless since dev is already dereferenced earlier. Besides, dev is passed by the rawdev layer and can't be NULL. Note: the issue was probably present before the incriminated commit. It is unclear why Coverity would start complaining about this now. Coverity issue: 380991 Fixes: 8f1d23ece06a ("eal: deprecate RTE_FUNC_PTR_* macros") Signed-off-by: David Marchand Acked-by: Hemant Agrawal Acked-by: Hemant Agrawal --- drivers/raw/skeleton/skeleton_rawdev.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/raw/skeleton/skeleton_rawdev.c b/drivers/raw/skeleton/skeleton_rawdev.c index 1d043bec5d..b2ca1cc5cd 100644 --- a/drivers/raw/skeleton/skeleton_rawdev.c +++ b/drivers/raw/skeleton/skeleton_rawdev.c @@ -475,9 +475,6 @@ static int skeleton_rawdev_firmware_status_get(struct rte_rawdev *dev, skeldev = skeleton_rawdev_get_priv(dev); - if (dev == NULL) - return -EINVAL; - if (status_info) memcpy(status_info, &skeldev->fw.firmware_state, sizeof(enum skeleton_firmware_state));