From nobody Wed Dec 17 12:21:13 2025 Received: from lelvem-ot01.ext.ti.com (lelvem-ot01.ext.ti.com [198.47.23.234]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AA19D20F08E; Tue, 30 Sep 2025 12:16:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.23.234 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759234605; cv=none; b=DWZbljNpq2dqZc3YqhgfnpIHhsVenjaPqp342zGuBcyO5sGSulG4XTlbyG2HJkPvsoUFnIpQ94FluGEuKK/nJGv5j81dqu4RgralsJdHq3vYukD+BZste3jAz9151fxdXW9k1gEKC5Vvu3bysMuybWwM71Ws9uE5+8aeqhvq2Z0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759234605; c=relaxed/simple; bh=htDw1G9v16Kq9cORxh2j5a9aXo00LjcFCzJfXGxc8Gc=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=MgfTxDEnSBexHVI0IZStb+KwUspLBnlrhg9t2Y3SKKodtAbyCnfnXT7d4OXFzuVmdGcYZzdCq/OPbsNPb2u61enl2a11pHsRjOU4dgqhTqBdkyS5p7+cAUoK0xCGeoIuBhHAqiuxxfGi6PsWj9RHxWzn7aBKYKm8VwAmoZtmh/g= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=OMS2Lnj6; arc=none smtp.client-ip=198.47.23.234 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="OMS2Lnj6" Received: from fllvem-sh04.itg.ti.com ([10.64.41.54]) by lelvem-ot01.ext.ti.com (8.15.2/8.15.2) with ESMTP id 58UCGMx92452077; Tue, 30 Sep 2025 07:16:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1759234582; bh=eQzqneoZALoPGRFFvWnZ1GCMXeesYcgJGLBteg4QWxo=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=OMS2Lnj6FEor2tCevR6C+qzWpPC+o/QsQtq9zVQUzTKMyECBB3WhrBccgi2b/KKqw nwgf7BXupzcCobH2nqiFN4sUrQXWAJGWM9f7M4ojdjtAKRbYcpGIpshfSLsz4hd1CA fkTlr51YaGx0NVas4PfQmUfwuxqlP46xLaq5q2Yg= Received: from DLEE102.ent.ti.com (dlee102.ent.ti.com [157.170.170.32]) by fllvem-sh04.itg.ti.com (8.18.1/8.18.1) with ESMTPS id 58UCGMWZ3905820 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA256 bits=128 verify=FAIL); Tue, 30 Sep 2025 07:16:22 -0500 Received: from DLEE207.ent.ti.com (157.170.170.95) by DLEE102.ent.ti.com (157.170.170.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.55; Tue, 30 Sep 2025 07:16:21 -0500 Received: from lelvem-mr06.itg.ti.com (10.180.75.8) by DLEE207.ent.ti.com (157.170.170.95) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20 via Frontend Transport; Tue, 30 Sep 2025 07:16:21 -0500 Received: from localhost (uda0133052.dhcp.ti.com [128.247.81.232]) by lelvem-mr06.itg.ti.com (8.18.1/8.18.1) with ESMTP id 58UCGLSp2892158; Tue, 30 Sep 2025 07:16:21 -0500 From: Nishanth Menon To: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Paolo Abeni , Jakub Kicinski , Eric Dumazet , "David S. Miller" , Andrew Lunn CC: Santosh Shilimkar , Simon Horman , Siddharth Vadapalli , , , , Nishanth Menon Subject: [PATCH V2 1/3] net: ethernet: ti: netcp: Handle both ERR_PTR and NULL from knav_dma_open_channel Date: Tue, 30 Sep 2025 07:16:07 -0500 Message-ID: <20250930121609.158419-2-nm@ti.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20250930121609.158419-1-nm@ti.com> References: <20250930121609.158419-1-nm@ti.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-C2ProcessedOrg: 333ef613-75bf-4e12-a4b1-8e3623f5dcea Content-Type: text/plain; charset="utf-8" The knav_dma_open_channel function has inconsistent return behavior: the header returns NULL when the driver is disabled, while the driver implementation returns ERR_PTR(-EINVAL). This inconsistency creates confusion for callers. Prepare for standardizing the function to return NULL by updating callers to handle both ERR_PTR and NULL return values using IS_ERR_OR_NULL() checks. Suggested-by: Simon Horman Signed-off-by: Nishanth Menon --- Changes in V2: * renewed version drivers/net/ethernet/ti/netcp_core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/ti/netcp_core.c b/drivers/net/ethernet/ti= /netcp_core.c index 857820657bac..2f9d26c791e3 100644 --- a/drivers/net/ethernet/ti/netcp_core.c +++ b/drivers/net/ethernet/ti/netcp_core.c @@ -1338,10 +1338,10 @@ int netcp_txpipe_open(struct netcp_tx_pipe *tx_pipe) =20 tx_pipe->dma_channel =3D knav_dma_open_channel(dev, tx_pipe->dma_chan_name, &config); - if (IS_ERR(tx_pipe->dma_channel)) { + if (IS_ERR_OR_NULL(tx_pipe->dma_channel)) { dev_err(dev, "failed opening tx chan(%s)\n", tx_pipe->dma_chan_name); - ret =3D PTR_ERR(tx_pipe->dma_channel); + ret =3D -EINVAL; goto err; } =20 @@ -1678,10 +1678,10 @@ static int netcp_setup_navigator_resources(struct n= et_device *ndev) =20 netcp->rx_channel =3D knav_dma_open_channel(netcp->netcp_device->device, netcp->dma_chan_name, &config); - if (IS_ERR(netcp->rx_channel)) { + if (IS_ERR_OR_NULL(netcp->rx_channel)) { dev_err(netcp->ndev_dev, "failed opening rx chan(%s\n", netcp->dma_chan_name); - ret =3D PTR_ERR(netcp->rx_channel); + ret =3D -EINVAL; goto fail; } =20 --=20 2.47.0 From nobody Wed Dec 17 12:21:13 2025 Received: from lelvem-ot02.ext.ti.com (lelvem-ot02.ext.ti.com [198.47.23.235]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BF66E1B4236; Tue, 30 Sep 2025 12:16:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.23.235 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759234611; cv=none; b=IF6PbmS3TwXLNLYfdFmm8Bh2R4ITyr9EiRVdWVx03sPhMQEmmGnuAwBZRWMGOtf/eGDQLVqLZvzryM/5Jt1BMjPPn43LF6QWPrAKDCOmi5Db213bNh7zB0MXihZnmfTDEXnp2Id8deFzhHs/eYQh8nH0Ljfjux+W4Frfs0bo0FI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759234611; c=relaxed/simple; bh=ZDMQtBSx/tempIWhtSRAyTG12Gi0CmsJXbMINLSdMd0=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=RYvv1wTHF2z6eiWVCshkrfh/V7n24c57ZCuLTjbgaHoJNWd/oBVJNGXGnO1DLRhqmhxJ5Wd319cf8g3CzfHUr8/HcdWmQ9NpORqm2D8meuPKW5jaUxs/+MxUxKczA5ReeuJ/VifkPuDTHUX4kF66JzeXicQVVF5K+0TNaMOCsx8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=th5fdSWa; arc=none smtp.client-ip=198.47.23.235 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="th5fdSWa" Received: from lelvem-sh01.itg.ti.com ([10.180.77.71]) by lelvem-ot02.ext.ti.com (8.15.2/8.15.2) with ESMTP id 58UCGMaD2911947; Tue, 30 Sep 2025 07:16:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1759234582; bh=DT3kmmoCh/QqwpiEzn8+Wg1aSuJs0OQeflPRtSBj4OA=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=th5fdSWa2pS7avy3CPJi20Rcr43GmjveGr5yG7lxHBPz04lInhVXVcAnRRVeLxUB4 3t1yDltwFhdAVvwDWGlfnzuyFhC8FWsGNjRxE1nC6r7Dp3jAjwQBaGhtV5Mig33r7C LC9mXPRE53fe3cFLlAb5IXcJS2LRNrroEKj5u3xg= Received: from DFLE105.ent.ti.com (dfle105.ent.ti.com [10.64.6.26]) by lelvem-sh01.itg.ti.com (8.18.1/8.18.1) with ESMTPS id 58UCGMaO2114239 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA256 bits=128 verify=FAIL); Tue, 30 Sep 2025 07:16:22 -0500 Received: from DFLE209.ent.ti.com (10.64.6.67) by DFLE105.ent.ti.com (10.64.6.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.55; Tue, 30 Sep 2025 07:16:21 -0500 Received: from lelvem-mr06.itg.ti.com (10.180.75.8) by DFLE209.ent.ti.com (10.64.6.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20 via Frontend Transport; Tue, 30 Sep 2025 07:16:21 -0500 Received: from localhost (uda0133052.dhcp.ti.com [128.247.81.232]) by lelvem-mr06.itg.ti.com (8.18.1/8.18.1) with ESMTP id 58UCGLwc2892161; Tue, 30 Sep 2025 07:16:21 -0500 From: Nishanth Menon To: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Paolo Abeni , Jakub Kicinski , Eric Dumazet , "David S. Miller" , Andrew Lunn CC: Santosh Shilimkar , Simon Horman , Siddharth Vadapalli , , , , Nishanth Menon Subject: [PATCH V2 2/3] soc: ti: knav_dma: Make knav_dma_open_channel return NULL on error Date: Tue, 30 Sep 2025 07:16:08 -0500 Message-ID: <20250930121609.158419-3-nm@ti.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20250930121609.158419-1-nm@ti.com> References: <20250930121609.158419-1-nm@ti.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-C2ProcessedOrg: 333ef613-75bf-4e12-a4b1-8e3623f5dcea Content-Type: text/plain; charset="utf-8" Make knav_dma_open_channel consistently return NULL on error instead of ERR_PTR. Currently the header include/linux/soc/ti/knav_dma.h returns NUL when the driver is disabled, but the driver implementation returns ERR_PTR(-EINVAL), creating API inconsistency for users. Standardize the error handling by making the function return NULL on all error conditions. Suggested-by: Simon Horman Signed-off-by: Nishanth Menon --- Changes in V2: * renewed version drivers/soc/ti/knav_dma.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/soc/ti/knav_dma.c b/drivers/soc/ti/knav_dma.c index a25ebe6cd503..e69f0946de29 100644 --- a/drivers/soc/ti/knav_dma.c +++ b/drivers/soc/ti/knav_dma.c @@ -402,7 +402,7 @@ static int of_channel_match_helper(struct device_node *= np, const char *name, * @name: slave channel name * @config: dma configuration parameters * - * Returns pointer to appropriate DMA channel on success or error. + * Returns pointer to appropriate DMA channel on success or NULL on error. */ void *knav_dma_open_channel(struct device *dev, const char *name, struct knav_dma_cfg *config) @@ -414,13 +414,13 @@ void *knav_dma_open_channel(struct device *dev, const= char *name, =20 if (!kdev) { pr_err("keystone-navigator-dma driver not registered\n"); - return (void *)-EINVAL; + return NULL; } =20 chan_num =3D of_channel_match_helper(dev->of_node, name, &instance); if (chan_num < 0) { dev_err(kdev->dev, "No DMA instance with name %s\n", name); - return (void *)-EINVAL; + return NULL; } =20 dev_dbg(kdev->dev, "initializing %s channel %d from DMA %s\n", @@ -431,7 +431,7 @@ void *knav_dma_open_channel(struct device *dev, const c= har *name, if (config->direction !=3D DMA_MEM_TO_DEV && config->direction !=3D DMA_DEV_TO_MEM) { dev_err(kdev->dev, "bad direction\n"); - return (void *)-EINVAL; + return NULL; } =20 /* Look for correct dma instance */ @@ -443,7 +443,7 @@ void *knav_dma_open_channel(struct device *dev, const c= har *name, } if (!dma) { dev_err(kdev->dev, "No DMA instance with name %s\n", instance); - return (void *)-EINVAL; + return NULL; } =20 /* Look for correct dma channel from dma instance */ @@ -463,14 +463,14 @@ void *knav_dma_open_channel(struct device *dev, const= char *name, if (!chan) { dev_err(kdev->dev, "channel %d is not in DMA %s\n", chan_num, instance); - return (void *)-EINVAL; + return NULL; } =20 if (atomic_read(&chan->ref_count) >=3D 1) { if (!check_config(chan, config)) { dev_err(kdev->dev, "channel %d config miss-match\n", chan_num); - return (void *)-EINVAL; + return NULL; } } =20 --=20 2.47.0 From nobody Wed Dec 17 12:21:13 2025 Received: from lelvem-ot01.ext.ti.com (lelvem-ot01.ext.ti.com [198.47.23.234]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AA1311B4236; Tue, 30 Sep 2025 12:16:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.23.234 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759234606; cv=none; b=ROwO7W6qRTq4xvCDpd0kf4pQ2zwPONm/4G/p2JJ/f8rWSHEfKGp+xmX5NixoCbTHrMKghddDZBpilg3SPFCeOvnl8e3L10GnTZxFgwqxMStsDbC9th7/SpSWKxmQnGeZiGbUOzoEYWgcKAzHDuwOuR9DJWMcV6shcRpppvYXCQI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759234606; c=relaxed/simple; bh=F9z2pdoShtFB6s9474Q7B9I5kQrU5fEr5+DvJc9GhNs=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=PhRkBYriYPcxI/dAO4Ws8kYfuX8nEIvoYRm5sZ4LVtGcu1Xk5Falhuzy5k1HcMhcyeTk3/x8giocE3a/5m9NJ+cniZsRhWfHdn/iKy/U9z6tXzbCtcn6vCmfNX6g+KLfVG+Q/1H5ZwErIYtuWyQQrGG50qFKP9i9w6eHVNyk3kc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=c8U+bAFF; arc=none smtp.client-ip=198.47.23.234 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="c8U+bAFF" Received: from lelvem-sh02.itg.ti.com ([10.180.78.226]) by lelvem-ot01.ext.ti.com (8.15.2/8.15.2) with ESMTP id 58UCGMs62452081; Tue, 30 Sep 2025 07:16:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1759234582; bh=RCj2gPL/swTE60NPVfYd6g82kNj4wFVRba4BUIVTON0=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=c8U+bAFFpNz7moJoS0kpYLakFQPAcDLbHGgDcV/FqRx65kKNJBLBCk0gX2Or5NoZb p7/rzsx19crhZRSQXUV3aXq4nv7SfZXe4adqxPJaReQnkdCL5+YqEVhtal8OX2jv2V VeJ6WAv0QvekZ1emNxpl11RAYyf5PT4PS+np3TFM= Received: from DFLE102.ent.ti.com (dfle102.ent.ti.com [10.64.6.23]) by lelvem-sh02.itg.ti.com (8.18.1/8.18.1) with ESMTPS id 58UCGMbb2677457 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA256 bits=128 verify=FAIL); Tue, 30 Sep 2025 07:16:22 -0500 Received: from DFLE204.ent.ti.com (10.64.6.62) by DFLE102.ent.ti.com (10.64.6.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.55; Tue, 30 Sep 2025 07:16:21 -0500 Received: from lelvem-mr06.itg.ti.com (10.180.75.8) by DFLE204.ent.ti.com (10.64.6.62) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20 via Frontend Transport; Tue, 30 Sep 2025 07:16:21 -0500 Received: from localhost (uda0133052.dhcp.ti.com [128.247.81.232]) by lelvem-mr06.itg.ti.com (8.18.1/8.18.1) with ESMTP id 58UCGLDE2892164; Tue, 30 Sep 2025 07:16:21 -0500 From: Nishanth Menon To: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Paolo Abeni , Jakub Kicinski , Eric Dumazet , "David S. Miller" , Andrew Lunn CC: Santosh Shilimkar , Simon Horman , Siddharth Vadapalli , , , , Nishanth Menon Subject: [PATCH V2 3/3] net: ethernet: ti: Remove IS_ERR_OR_NULL checks for knav_dma_open_channel Date: Tue, 30 Sep 2025 07:16:09 -0500 Message-ID: <20250930121609.158419-4-nm@ti.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20250930121609.158419-1-nm@ti.com> References: <20250930121609.158419-1-nm@ti.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-C2ProcessedOrg: 333ef613-75bf-4e12-a4b1-8e3623f5dcea Content-Type: text/plain; charset="utf-8" knav_dma_open_channel now only returns NULL on failure instead of error pointers. Replace IS_ERR_OR_NULL checks with simple NULL checks. Suggested-by: Simon Horman Signed-off-by: Nishanth Menon --- Changes in V2: * renewed version * Dropped the fixes since code refactoring was involved. V1: https://lore.kernel.org/all/20250926150853.2907028-1-nm@ti.com/ drivers/net/ethernet/ti/netcp_core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/ti/netcp_core.c b/drivers/net/ethernet/ti= /netcp_core.c index 2f9d26c791e3..5ee13db568f0 100644 --- a/drivers/net/ethernet/ti/netcp_core.c +++ b/drivers/net/ethernet/ti/netcp_core.c @@ -1338,7 +1338,7 @@ int netcp_txpipe_open(struct netcp_tx_pipe *tx_pipe) =20 tx_pipe->dma_channel =3D knav_dma_open_channel(dev, tx_pipe->dma_chan_name, &config); - if (IS_ERR_OR_NULL(tx_pipe->dma_channel)) { + if (!tx_pipe->dma_channel) { dev_err(dev, "failed opening tx chan(%s)\n", tx_pipe->dma_chan_name); ret =3D -EINVAL; @@ -1359,7 +1359,7 @@ int netcp_txpipe_open(struct netcp_tx_pipe *tx_pipe) return 0; =20 err: - if (!IS_ERR_OR_NULL(tx_pipe->dma_channel)) + if (tx_pipe->dma_channel) knav_dma_close_channel(tx_pipe->dma_channel); tx_pipe->dma_channel =3D NULL; return ret; @@ -1678,7 +1678,7 @@ static int netcp_setup_navigator_resources(struct net= _device *ndev) =20 netcp->rx_channel =3D knav_dma_open_channel(netcp->netcp_device->device, netcp->dma_chan_name, &config); - if (IS_ERR_OR_NULL(netcp->rx_channel)) { + if (!netcp->rx_channel) { dev_err(netcp->ndev_dev, "failed opening rx chan(%s\n", netcp->dma_chan_name); ret =3D -EINVAL; --=20 2.47.0