]> git.baikalelectronics.ru Git - kernel.git/commitdiff
ptp: ptp_ines: Remove redundant null check
authorXu Wang <vulab@iscas.ac.cn>
Wed, 26 Aug 2020 03:12:51 +0000 (03:12 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 26 Aug 2020 14:08:59 +0000 (07:08 -0700)
Because kfree_skb already checked NULL skb parameter,
so the additional check is unnecessary, just remove it.

Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/ptp/ptp_ines.c

index d726c589eddaa7ef67e5ace74a429a19bb49e582..4700ffbdfceda3b8640e6b6594e88cb0d29a8d6c 100644 (file)
@@ -644,8 +644,7 @@ static void ines_txtstamp(struct mii_timestamper *mii_ts,
 
        spin_unlock_irqrestore(&port->lock, flags);
 
-       if (old_skb)
-               kfree_skb(old_skb);
+       kfree_skb(old_skb);
 
        schedule_delayed_work(&port->ts_work, 1);
 }