Messages in this thread Patch in this message | | | From | Xu Wang <> | Subject | [PATCH] ptp: ptp_ines: Remove redundant null check | Date | Wed, 26 Aug 2020 03:12:51 +0000 |
| |
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> --- drivers/ptp/ptp_ines.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/ptp/ptp_ines.c b/drivers/ptp/ptp_ines.c index 7711651ff19e..2c1fb99aa37c 100644 --- a/drivers/ptp/ptp_ines.c +++ b/drivers/ptp/ptp_ines.c @@ -663,8 +663,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); } -- 2.17.1
| |