From 0834be6c52367d397d75e185dad549e3da9be312 Mon Sep 17 00:00:00 2001 From: Sudip Mukherjee Date: Fri, 4 Sep 2015 16:22:05 +0530 Subject: [PATCH] staging: most: remove unneeded NULL check The loop cursor of list_for_each_entry_safe() can never be NULL. Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman --- drivers/staging/most/mostcore/core.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/most/mostcore/core.c b/drivers/staging/most/mostcore/core.c index 7bb16db42893..87f950fad9b4 100644 --- a/drivers/staging/most/mostcore/core.c +++ b/drivers/staging/most/mostcore/core.c @@ -190,8 +190,7 @@ static void flush_channel_fifos(struct most_c_obj *c) list_for_each_entry_safe(mbo, tmp, &c->fifo, list) { list_del(&mbo->list); spin_unlock_irqrestore(&c->fifo_lock, flags); - if (likely(mbo)) - most_free_mbo_coherent(mbo); + most_free_mbo_coherent(mbo); spin_lock_irqsave(&c->fifo_lock, flags); } spin_unlock_irqrestore(&c->fifo_lock, flags); @@ -200,8 +199,7 @@ static void flush_channel_fifos(struct most_c_obj *c) list_for_each_entry_safe(mbo, tmp, &c->halt_fifo, list) { list_del(&mbo->list); spin_unlock_irqrestore(&c->fifo_lock, hf_flags); - if (likely(mbo)) - most_free_mbo_coherent(mbo); + most_free_mbo_coherent(mbo); spin_lock_irqsave(&c->fifo_lock, hf_flags); } spin_unlock_irqrestore(&c->fifo_lock, hf_flags); -- 2.30.2