mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH-next] mailbox: ti-msgmgr: Remove redundant logical check
@ 2024-11-25 16:29 Advait Dhamorikar
  0 siblings, 0 replies; only message in thread
From: Advait Dhamorikar @ 2024-11-25 16:29 UTC (permalink / raw)
  To: Jassi Brar; +Cc: linux-kernel, Advait Dhamorikar

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@gmail.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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-11-25 16:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-25 16:29 [PATCH-next] mailbox: ti-msgmgr: Remove redundant logical check Advait Dhamorikar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®