Use list_move() instead of list_del() + list_add_tail() to simplify the code. Signed-off-by: Geliang Tang <geliangtang@xxxxxxxxx> --- drivers/hid/intel-ish-hid/ishtp/client.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/hid/intel-ish-hid/ishtp/client.c b/drivers/hid/intel-ish-hid/ishtp/client.c index aad6132..0979e04 100644 --- a/drivers/hid/intel-ish-hid/ishtp/client.c +++ b/drivers/hid/intel-ish-hid/ishtp/client.c @@ -497,12 +497,8 @@ int ishtp_cl_read_start(struct ishtp_cl *cl) out: /* if ishtp_hbm_cl_flow_control_req failed, return rb to free list */ if (rets && rb) { - spin_lock_irqsave(&dev->read_list_spinlock, dev_flags); - list_del(&rb->list); - spin_unlock_irqrestore(&dev->read_list_spinlock, dev_flags); - spin_lock_irqsave(&cl->free_list_spinlock, flags); - list_add_tail(&rb->list, &cl->free_rb_list.list); + list_move_tail(&rb->list, &cl->free_rb_list.list); spin_unlock_irqrestore(&cl->free_list_spinlock, flags); } return rets; -- 2.9.3 -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html