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-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241002132820.402583-3-sayyad.abid16@gmail.com>
Date: Wed,  2 Oct 2024 18:58:19 +0530
From: Sayyad Abid <sayyad.abid16@...il.com>
To: linux-m68k@...ts.linux-m68k.org
Cc: fthain@...ux-m68k.org,
	linux-kernel@...r.kernel.org,
	skhan@...uxfoundation.org,
	sayyad.abid16@...il.com
Subject: [PATCH 2/3] drivers: nubus: Fix use of assignment in if condition in nubus_add_board() in nubus.c

This change help improve code readabaility by
shifting the assignment statement just above the if statment,
which was earlier inside the condition.
This makes the code clear and easy to read.

Signed-off-by: Sayyad Abid <sayyad.abid16@...il.com>
---
 drivers/nubus/nubus.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/nubus/nubus.c b/drivers/nubus/nubus.c
index 08cf585cb471..77da1d14a1db 100644
--- a/drivers/nubus/nubus.c
+++ b/drivers/nubus/nubus.c
@@ -735,7 +735,8 @@ static void __init nubus_add_board(int slot, int bytelanes)
 	nubus_rewind(&rp, FORMAT_BLOCK_SIZE, bytelanes);

 	/* Actually we should probably panic if this fails */
-	if ((board = kzalloc(sizeof(*board), GFP_ATOMIC)) == NULL)
+	board = kzalloc(sizeof(*board), GFP_ATOMIC)
+	if (board == NULL)
 		return;
 	board->fblock = rp;

--
2.39.5


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ