staging: most: dim2: remove unnecessary NULL check in service_done_flag()
Subsystems (2)
PATCH 1/1 staging: most: dim2: remove unnecessary NULL check in service_done_flag()
From: Gabriel Rondon <[email protected]>
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 <[email protected]>
Signed-off-by Gabriel Rondon <[email protected]>
--- drivers/staging/most/dim2/dim2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/most/dim2/dim2.c +1 -1
@@ -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);
Signature · 1 line
2.33.0