hamradio: Delete unnecessary checks before the macro call “dev_kfree_skb”
The dev_kfree_skb() function performs also input parameter validation. Thus the test around the shown calls is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
038dab7efc
commit
b7deac3197
|
@ -961,8 +961,7 @@ static int epp_close(struct net_device *dev)
|
||||||
parport_write_control(pp, 0); /* reset the adapter */
|
parport_write_control(pp, 0); /* reset the adapter */
|
||||||
parport_release(bc->pdev);
|
parport_release(bc->pdev);
|
||||||
parport_unregister_device(bc->pdev);
|
parport_unregister_device(bc->pdev);
|
||||||
if (bc->skb)
|
dev_kfree_skb(bc->skb);
|
||||||
dev_kfree_skb(bc->skb);
|
|
||||||
bc->skb = NULL;
|
bc->skb = NULL;
|
||||||
printk(KERN_INFO "%s: close epp at iobase 0x%lx irq %u\n",
|
printk(KERN_INFO "%s: close epp at iobase 0x%lx irq %u\n",
|
||||||
bc_drvname, dev->base_addr, dev->irq);
|
bc_drvname, dev->base_addr, dev->irq);
|
||||||
|
|
|
@ -475,8 +475,7 @@ static int hdlcdrv_close(struct net_device *dev)
|
||||||
|
|
||||||
if (s->ops && s->ops->close)
|
if (s->ops && s->ops->close)
|
||||||
i = s->ops->close(dev);
|
i = s->ops->close(dev);
|
||||||
if (s->skb)
|
dev_kfree_skb(s->skb);
|
||||||
dev_kfree_skb(s->skb);
|
|
||||||
s->skb = NULL;
|
s->skb = NULL;
|
||||||
s->opened = 0;
|
s->opened = 0;
|
||||||
return i;
|
return i;
|
||||||
|
|
Loading…
Reference in New Issue