lkml.org 
[lkml]   [2012]   [Dec]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 4/5] net: sfc: fix return value check in efx_ptp_probe_channel().
Date
The ptp_clock_register() returns ERR_PTR() and never returns NULL. Replace the
NULL check by a call to IS_ERR().

Signed-off-by: Cyril Roelandt <tipecaml@gmail.com>
---
drivers/net/ethernet/sfc/ptp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/sfc/ptp.c b/drivers/net/ethernet/sfc/ptp.c
index 0767043f..9bcc38c 100644
--- a/drivers/net/ethernet/sfc/ptp.c
+++ b/drivers/net/ethernet/sfc/ptp.c
@@ -930,7 +930,7 @@ static int efx_ptp_probe_channel(struct efx_channel *channel)

ptp->phc_clock = ptp_clock_register(&ptp->phc_clock_info,
&efx->pci_dev->dev);
- if (!ptp->phc_clock)
+ if (IS_ERR(ptp->phc_clock))
goto fail3;

INIT_WORK(&ptp->pps_work, efx_ptp_pps_worker);
--
1.7.10.4


\
 
 \ /
  Last update: 2012-12-12 02:01    [W:0.117 / U:6.340 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site