On Friday 19 June 2015 15:09:18 Marek Lindner wrote:
>               spin_lock_bh(&bat_priv->tt.req_list_lock);
> -             list_del(&tt_req_node->list);
> +             /* only remove tt_req_node if it still is in the list */
> +             if (!hlist_unhashed(&tt_req_node->list))
> +                     hlist_del_init(&tt_req_node->list);
>               spin_unlock_bh(&bat_priv->tt.req_list_lock);
>               kfree(tt_req_node);
>       }

hlist_del_init doesn't require the hlist_unhashed check because this is
already done inside of this function [1].

Kind regards,
        Sven

[1] 
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/include/linux/list.h?id=a54acb3a6f853e8394c4cb7b6a4d93c88f13eefd#n588

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to