On Wed, 2017-02-15 at 20:25 +0000, Anoob Soman wrote:

> +static struct packet_fanout *fanout_release(struct sock *sk)
>  {
>       struct packet_sock *po = pkt_sk(sk);
>       struct packet_fanout *f;
> @@ -1728,17 +1736,17 @@ static void fanout_release(struct sock *sk)
>       if (f) {
>               po->fanout = NULL;
>  
> -             if (atomic_dec_and_test(&f->sk_ref)) {
> +             if (atomic_dec_and_test(&f->sk_ref))
>                       list_del(&f->list);
> -                     dev_remove_pack(&f->prot_hook);
> -                     fanout_release_data(f);
> -                     kfree(f);
> -             }
> +             else
> +                     f = NULL;


Patch looks good, except this coding style issue.

if (...) {
        multi lines;
        expressions;
} else {
        f = NULL;
}


Not :

if (...) {
        multi lines;
        expressions;
} else
        f = NULL;




Reply via email to