* [PATCH] staging: most: dim2: remove unnecessary NULL check in service_done_flag()
@ 2026-03-31 16:44 grondon
0 siblings, 0 replies; only message in thread
From: grondon @ 2026-03-31 16:44 UTC (permalink / raw)
To: gregkh
Cc: error27, christian.gromm, parthiban.veerasooran, linux-staging,
linux-kernel, Gabriel Rondon
From: Gabriel Rondon <grondon@gmail.com>
Remove the !hdm_ch check. hdm_ch is derived from dev->hch + ch_idx
(pointer arithmetic on a struct member), so it can never be NULL.
Keep only the !hdm_ch->is_initialized check.
Reported-by: Dan Carpenter <error27@gmail.com>
Closes: https://lore.kernel.org/all/acuoL4DRi0pmsQY1@stanley.mountain
Signed-off-by: Gabriel Rondon <grondon@gmail.com>
---
drivers/staging/most/dim2/dim2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/most/dim2/dim2.c b/drivers/staging/most/dim2/dim2.c
index 7953d4626..f5bd7d44f 100644
--- a/drivers/staging/most/dim2/dim2.c
+++ b/drivers/staging/most/dim2/dim2.c
@@ -271,7 +271,7 @@ static void service_done_flag(struct dim2_hdm *dev, int ch_idx)
unsigned long flags;
u8 *data;
- if (!hdm_ch || !hdm_ch->is_initialized)
+ if (!hdm_ch->is_initialized)
return;
spin_lock_irqsave(&dim_lock, flags);
--
2.33.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-03-31 16:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-31 16:44 [PATCH] staging: most: dim2: remove unnecessary NULL check in service_done_flag() grondon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox