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: <20241125162909.20319-1-advaitdhamorikar@gmail.com>
Date: Mon, 25 Nov 2024 21:59:09 +0530
From: Advait Dhamorikar <advaitdhamorikar@...il.com>
To: Jassi Brar <jassisinghbrar@...il.com>
Cc: linux-kernel@...r.kernel.org,
	Advait Dhamorikar <advaitdhamorikar@...il.com>
Subject: [PATCH-next] mailbox: ti-msgmgr: Remove redundant logical check

Remove redundant `WARN_ON(!inst)` check as `container_of` will 
always calculate the address of `ti_msgmgr_inst` if *mbox is valid.
The indicated dead code may have performed some action; that action 
will never occur.

Signed-off-by: Advait Dhamorikar <advaitdhamorikar@...il.com>
---
 drivers/mailbox/ti-msgmgr.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/mailbox/ti-msgmgr.c b/drivers/mailbox/ti-msgmgr.c
index 8eb8df8d95a4..b5fb01327d80 100644
--- a/drivers/mailbox/ti-msgmgr.c
+++ b/drivers/mailbox/ti-msgmgr.c
@@ -580,8 +580,6 @@ static struct mbox_chan *ti_msgmgr_of_xlate(struct mbox_controller *mbox,
 	int i, ncells;
 
 	inst = container_of(mbox, struct ti_msgmgr_inst, mbox);
-	if (WARN_ON(!inst))
-		return ERR_PTR(-EINVAL);
 
 	d = inst->desc;
 
-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ