From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_2 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 47438C433E0 for ; Wed, 3 Feb 2021 23:25:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E082C64F55 for ; Wed, 3 Feb 2021 23:25:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233429AbhBCXZN (ORCPT ); Wed, 3 Feb 2021 18:25:13 -0500 Received: from mga01.intel.com ([192.55.52.88]:23948 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233210AbhBCXZI (ORCPT ); Wed, 3 Feb 2021 18:25:08 -0500 IronPort-SDR: QQfWHrn9tOb6PtI0MiDD360CKTb3aPNhg0a52EuPBG50OlTCfD98MAhJsmOQbxkD20s5zK6xht 8R8iEFwmvRDQ== X-IronPort-AV: E=McAfee;i="6000,8403,9884"; a="200106321" X-IronPort-AV: E=Sophos;i="5.79,399,1602572400"; d="scan'208";a="200106321" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Feb 2021 15:24:26 -0800 IronPort-SDR: NBZiFBwwcwVd4Wgjr7dWsVE5+3zJXN7/osWGPQALR1Fe+Q837XBS7c3eFFrbQMFxXqdaUSU87n sd/zCEwwW4Zw== X-IronPort-AV: E=Sophos;i="5.79,399,1602572400"; d="scan'208";a="356185467" Received: from jbrandeb-mobl4.amr.corp.intel.com (HELO localhost) ([10.209.23.15]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Feb 2021 15:24:25 -0800 Date: Wed, 3 Feb 2021 15:24:25 -0800 From: Jesse Brandeburg To: Colin King Cc: Yisen Zhuang , Salil Mehta , "David S . Miller" , "Jakub Kicinski" , Huazhong Tan , "Guangbin Huang" , , , Subject: Re: [PATCH][next] net: hns3: remove redundant null check of an array Message-ID: <20210203152425.00007a51@intel.com> In-Reply-To: <20210203131040.21656-1-colin.king@canonical.com> References: <20210203131040.21656-1-colin.king@canonical.com> X-Mailer: Claws Mail 3.12.0 (GTK+ 2.24.28; i686-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Colin King wrote: > From: Colin Ian King > > The null check of filp->f_path.dentry->d_iname is redundant because > it is an array of DNAME_INLINE_LEN chars and cannot be a null. Fix > this by removing the null check. > > Addresses-Coverity: ("Array compared against 0") > Fixes: 04987ca1b9b6 ("net: hns3: add debugfs support for tm nodes, priority and qset info") > Signed-off-by: Colin Ian King Reviewed-by: Jesse Brandeburg