> Function ptp_clock_register() returns ERR_PTR() and never returns > NULL. The NULL test should be removed. Thanks, Wei! Function by itself could return null, but you are right, since this code is now active only when PTP_1588_CLOCK is on - this is a useless check then. > Signed-off-by: Wei Yongjun <weiyongjun1@xxxxxxxxxx> > --- > drivers/net/ethernet/aquantia/atlantic/aq_ptp.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_ptp.c b/drivers/net/ethernet/aquantia/atlantic/aq_ptp.c > index 3ec08415e53e..252a80b6d3b6 100644 > --- a/drivers/net/ethernet/aquantia/atlantic/aq_ptp.c > +++ b/drivers/net/ethernet/aquantia/atlantic/aq_ptp.c > @@ -1205,7 +1205,7 @@ int aq_ptp_init(struct aq_nic_s *aq_nic, unsigned int idx_vec) > aq_ptp->ptp_info = aq_ptp_clock; > aq_ptp_gpio_init(&aq_ptp->ptp_info, &mbox.info); > clock = ptp_clock_register(&aq_ptp->ptp_info, &aq_nic->ndev->dev); > - if (!clock || IS_ERR(clock)) { > + if (IS_ERR(clock)) { > netdev_err(aq_nic->ndev, "ptp_clock_register failed\n"); > err = PTR_ERR(clock); > goto err_exit; Acked-by: Igor Russkikh <irusskikh@xxxxxxxxxxx> -- Regards, Igor