staging: r8712u: delete unnecessary field initialization
authorJulia Lawall <Julia.Lawall@lip6.fr>
Sat, 15 Feb 2014 07:36:11 +0000 (08:36 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 15 Feb 2014 20:32:55 +0000 (12:32 -0800)
commit4bb101d4f21be51e0f10ca71440e34858ce7b827
tree21308d0893e6209a9f64135efbe91527ff481084
parentec97423afbd09c566fc3e756b4a6b50695dda0af
staging: r8712u: delete unnecessary field initialization

On success, the function netdev_alloc_skb initializes the dev field of its
result to its first argument, so this doesn't have to be done in the
calling context.

The semantic patch that fixes this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression skb,privn,e;
@@

skb = netdev_alloc_skb(privn,...);
... when strict
(
-skb->dev = privn;
|
?skb = e
)
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8712/rtl8712_recv.c