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>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200415140640.19948-1-tangbin@cmss.chinamobile.com>
Date:   Wed, 15 Apr 2020 22:06:40 +0800
From:   Tang Bin <tangbin@...s.chinamobile.com>
To:     wsa@...-dreams.de, o.rempel@...gutronix.de,
        u.kleine-koenig@...gutronix.de, ardb@...nel.org
Cc:     linux-i2c@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-kernel@...r.kernel.org,
        Tang Bin <tangbin@...s.chinamobile.com>,
        Shengju Zhang <zhangshengju@...s.chinamobile.com>
Subject: [PATCH] i2c: drivers: Avoid unnecessary check in efm32_i2c_probe()

The function efm32_i2c_probe() is only called with an
openfirmware platform device.Therefore there is no need
to check that it has an openfirmware node.

Signed-off-by: Tang Bin <tangbin@...s.chinamobile.com>
Signed-off-by: Shengju Zhang <zhangshengju@...s.chinamobile.com>
---
 drivers/i2c/busses/i2c-efm32.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/i2c/busses/i2c-efm32.c b/drivers/i2c/busses/i2c-efm32.c
index 4de31fae7..4786ef6b2 100644
--- a/drivers/i2c/busses/i2c-efm32.c
+++ b/drivers/i2c/busses/i2c-efm32.c
@@ -312,9 +312,6 @@ static int efm32_i2c_probe(struct platform_device *pdev)
 	int ret;
 	u32 clkdiv;
 
-	if (!np)
-		return -EINVAL;
-
 	ddata = devm_kzalloc(&pdev->dev, sizeof(*ddata), GFP_KERNEL);
 	if (!ddata)
 		return -ENOMEM;
-- 
2.20.1.windows.1



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ