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: <20241112081637.40962-1-zhangjiao2@cmss.chinamobile.com>
Date: Tue, 12 Nov 2024 16:16:37 +0800
From: zhangjiao2 <zhangjiao2@...s.chinamobile.com>
To: broonie@...nel.org
Cc: linux-spi@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	zhang jiao <zhangjiao2@...s.chinamobile.com>
Subject: [PATCH] spi: Delete useless checks

From: zhang jiao <zhangjiao2@...s.chinamobile.com>

Since "res" will never be null, just delete this check.

Signed-off-by: zhang jiao <zhangjiao2@...s.chinamobile.com>
---
 drivers/spi/spi.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 74e04a4b0f19..460a49d9a0de 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -984,9 +984,6 @@ static void spi_res_free(void *res)
 {
 	struct spi_res *sres = container_of(res, struct spi_res, data);
 
-	if (!res)
-		return;
-
 	WARN_ON(!list_empty(&sres->entry));
 	kfree(sres);
 }
-- 
2.33.0




Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ