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: <20240906114455.730559-1-roheetchavan@gmail.com>
Date: Fri,  6 Sep 2024 17:14:55 +0530
From: Rohit Chavan <roheetchavan@...il.com>
To: Johannes Berg <johannes@...solutions.net>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>,
	Paolo Abeni <pabeni@...hat.com>,
	linux-wireless@...r.kernel.org,
	netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org
Cc: Rohit Chavan <roheetchavan@...il.com>
Subject: [PATCH] lib80211: Use ERR_CAST() to return

Using ERR_CAST() is more reasonable and safer, When it is necessary
to convert the type of an error pointer and return it.

Signed-off-by: Rohit Chavan <roheetchavan@...il.com>
---
 net/wireless/lib80211.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/wireless/lib80211.c b/net/wireless/lib80211.c
index d66a913027e0..87c0e09aa676 100644
--- a/net/wireless/lib80211.c
+++ b/net/wireless/lib80211.c
@@ -227,7 +227,7 @@ EXPORT_SYMBOL(lib80211_get_crypto_ops);
 
 static void *lib80211_crypt_null_init(int keyidx)
 {
-	return (void *)1;
+	return ERR_CAST(1);
 }
 
 static void lib80211_crypt_null_deinit(void *priv)
-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ