From: Sudip Mukherjee Date: Fri, 4 Sep 2015 10:52:05 +0000 (+0530) Subject: staging: most: remove unneeded NULL check X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=0834be6c52367d397d75e185dad549e3da9be312;p=linux-beck.git 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 --- 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);