[PATCH] ptp: ptp_ines: Remove redundant null check

From: Xu Wang
Date: Tue Aug 25 2020 - 23:13:35 EST


Because kfree_skb already checked NULL skb parameter,
so the additional check is unnecessary, just remove it.

Signed-off-by: Xu Wang <vulab@xxxxxxxxxxx>
---
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