lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20210512100100.12516-1-tangbin@cmss.chinamobile.com>
Date:   Wed, 12 May 2021 18:01:00 +0800
From:   Tang Bin <tangbin@...s.chinamobile.com>
To:     yisen.zhuang@...wei.com, salil.mehta@...wei.com,
        davem@...emloft.net, kuba@...nel.org
Cc:     netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        Tang Bin <tangbin@...s.chinamobile.com>
Subject: [PATCH] net: hns: Fix unnecessary check in hns_mdio_probe()

The function hns_mdio_probe() is only called with an openfirmware
platform device. Therefore there is no need to check that the passed
in device is NULL.

Signed-off-by: Tang Bin <tangbin@...s.chinamobile.com>
---
 drivers/net/ethernet/hisilicon/hns_mdio.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/net/ethernet/hisilicon/hns_mdio.c b/drivers/net/ethernet/hisilicon/hns_mdio.c
index 7df5d7d21..9e1d460c6 100644
--- a/drivers/net/ethernet/hisilicon/hns_mdio.c
+++ b/drivers/net/ethernet/hisilicon/hns_mdio.c
@@ -423,11 +423,6 @@ static int hns_mdio_probe(struct platform_device *pdev)
 	struct mii_bus *new_bus;
 	int ret = -ENODEV;
 
-	if (!pdev) {
-		dev_err(NULL, "pdev is NULL!\r\n");
-		return -ENODEV;
-	}
-
 	mdio_dev = devm_kzalloc(&pdev->dev, sizeof(*mdio_dev), GFP_KERNEL);
 	if (!mdio_dev)
 		return -ENOMEM;
-- 
2.20.1.windows.1



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ