On Sat, Jul 20, 2024 at 09:01:48AM +0530, Pavan Chebbi wrote: > > 759 > > 760 tx_free: > > 761 dev_kfree_skb_any(skb); > > 762 tx_kick_pending: > > 763 if (BNXT_TX_PTP_IS_SET(lflags)) { > > 764 txr->tx_buf_ring[txr->tx_prod].is_ts_pkt = 0; > > 765 atomic64_inc(&bp->ptp_cfg->stats.ts_err); > > 766 if (!(bp->fw_cap & BNXT_FW_CAP_TX_TS_CMP)) > > 767 /* set SKB to err so PTP worker will clean up */ > > --> 768 ptp->txts_req[txts_prod].tx_skb = ERR_PTR(-EIO); > > ^^^^^^^^^^^^^ > > The patch adds an unchecked dereference > > If ptp is null at 513, we will never set the lflags with TX_BD_FLAGS_STAMP. > Hence I think this Smatch error be ignored because under no condition > we will reach here where we find BNXT_TX_PTP_IS_SET(lflags) = true and > we don't have a valid ptp (bp->ptp_cfg) > Thanks > Ah, yes. Thanks for the review. regards, dan carpenter