]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: remove redundant null check of an array
authorColin Ian King <colin.king@canonical.com>
Wed, 3 Feb 2021 13:10:40 +0000 (13:10 +0000)
committerJakub Kicinski <kuba@kernel.org>
Fri, 5 Feb 2021 02:37:47 +0000 (18:37 -0800)
commit8d6ac3c49742137ad0fc1bced5d53e0e9c73da9e
tree28e9ef1034af8450158b85c4c5b4a1ba122f6f5d
parent593d0ebc5b2fcc01f636295d37c884f6d2f02573
net: hns3: remove redundant null check of an array

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: 90b494c8fe3d ("net: hns3: add debugfs support for tm nodes, priority and qset info")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Link: https://lore.kernel.org/r/20210203131040.21656-1-colin.king@canonical.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c