From: Gabriel Rondon <grondon@gmail.com>
Remove the !hdm_ch check. Although hdm_ch is a function parameter,
it is already dereferenced on the preceding line to initialize
head (head = &hdm_ch->pending_list), so a NULL check after that
point is dead code.
Reported-by: Dan Carpenter <error27@gmail.com>
Closes: https://lore.kernel.org/all/acwjEHyEYg0V3OyC@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 f5bd7d44f..327790436 100644
--- a/drivers/staging/most/dim2/dim2.c
+++ b/drivers/staging/most/dim2/dim2.c
@@ -165,7 +165,7 @@ static int try_start_dim_transfer(struct hdm_channel *hdm_ch)
unsigned long flags;
struct dim_ch_state st;
- if (!hdm_ch || !hdm_ch->is_initialized)
+ if (!hdm_ch->is_initialized)
return -EINVAL;
spin_lock_irqsave(&dim_lock, flags);
--
2.33.0