You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
56 lines
2.0 KiB
56 lines
2.0 KiB
From 1d5de9236ce4575b6b00d35eccd40cb4219cf6be Mon Sep 17 00:00:00 2001
|
|
From: Igor Russkikh <irusskik@redhat.com>
|
|
Date: Fri, 6 Nov 2020 18:36:55 -0500
|
|
Subject: [PATCH 038/139] [netdrv] net: aquantia: fix return value check in
|
|
aq_ptp_init()
|
|
|
|
Message-id: <1604687916-15087-39-git-send-email-irusskik@redhat.com>
|
|
Patchwork-id: 338465
|
|
Patchwork-instance: patchwork
|
|
O-Subject: [RHEL8.4 BZ 1857861 038/139] net: aquantia: fix return value check in aq_ptp_init()
|
|
Bugzilla: 1857861
|
|
RH-Acked-by: David Arcari <darcari@redhat.com>
|
|
RH-Acked-by: John Linville <linville@redhat.com>
|
|
RH-Acked-by: Tony Camuso <tcamuso@redhat.com>
|
|
|
|
Bugzilla: http://bugzilla.redhat.com/1857861
|
|
|
|
commit 1dcff44a9d2b74b3de2c854bbf11a5f765e7ba77
|
|
Author: Wei Yongjun <weiyongjun1@huawei.com>
|
|
Date: Wed Nov 6 14:59:21 2019 +0000
|
|
|
|
net: aquantia: fix return value check in aq_ptp_init()
|
|
|
|
Function ptp_clock_register() returns ERR_PTR() and never returns
|
|
NULL. The NULL test should be removed.
|
|
|
|
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
|
|
Acked-by: Igor Russkikh <irusskikh@marvell.com>
|
|
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
|
|
Signed-off-by: Igor Russkikh <irusskik@redhat.com>
|
|
|
|
Cc: David Arcari <darcari@redhat.com>
|
|
Cc: Igor Russkikh <irusskik@redhat.com>
|
|
Signed-off-by: Jan Stancek <jstancek@redhat.com>
|
|
---
|
|
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 8175513e48c9..1f9eab74453e 100644
|
|
--- a/drivers/net/ethernet/aquantia/atlantic/aq_ptp.c
|
|
+++ b/drivers/net/ethernet/aquantia/atlantic/aq_ptp.c
|
|
@@ -1207,7 +1207,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;
|
|
--
|
|
2.13.6
|
|
|