mirror of https://gitee.com/openkylin/linux.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 <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
983e83cc17
commit
0834be6c52
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue