Skip to content

Commit

Permalink
ptp: ptp_ines: Remove redundant null check
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Xu Wang authored and David S. Miller committed Aug 26, 2020
1 parent ca65a28 commit ea416e2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/ptp/ptp_ines.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit ea416e2

Please sign in to comment.