Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1728756 > unrolled thread

[PATCH net] phy: mvebu-cp110: checking for NULL instead of IS_ERR()

Started byDan Carpenter <dan.carpenter@oracle.com>
First post2017-09-08 12:40 +0200
Last post2017-09-11 19:30 +0200
Articles 4 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH net] phy: mvebu-cp110: checking for NULL instead of IS_ERR() Dan Carpenter <dan.carpenter@oracle.com> - 2017-09-08 12:40 +0200
    Re: [PATCH net] phy: mvebu-cp110: checking for NULL instead of  IS_ERR() David Miller <davem@davemloft.net> - 2017-09-09 06:10 +0200
      Re: [PATCH net] phy: mvebu-cp110: checking for NULL instead of  IS_ERR() Kishon Vijay Abraham I <kishon@ti.com> - 2017-09-11 09:30 +0200
        Re: [PATCH net] phy: mvebu-cp110: checking for NULL instead of  IS_ERR() David Miller <davem@davemloft.net> - 2017-09-11 19:30 +0200

#1728756 — [PATCH net] phy: mvebu-cp110: checking for NULL instead of IS_ERR()

FromDan Carpenter <dan.carpenter@oracle.com>
Date2017-09-08 12:40 +0200
Subject[PATCH net] phy: mvebu-cp110: checking for NULL instead of IS_ERR()
Message-ID<unoRA-5F0-15@gated-at.bofh.it>
devm_ioremap_resource() never returns NULL, it only returns error
pointers so this test needs to be changed.

Fixes: d0438bd6aa09 ("phy: add the mvebu cp110 comphy driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
This driver apparently is going through the net tree, but netdev isn't
listed as handling it in MAINTAINERS.  Kishon, do you know what's up
with that?

diff --git a/drivers/phy/marvell/phy-mvebu-cp110-comphy.c b/drivers/phy/marvell/phy-mvebu-cp110-comphy.c
index 73ebad6634a7..24578bd68ddc 100644
--- a/drivers/phy/marvell/phy-mvebu-cp110-comphy.c
+++ b/drivers/phy/marvell/phy-mvebu-cp110-comphy.c
@@ -576,8 +576,8 @@ static int mvebu_comphy_probe(struct platform_device *pdev)
 		return PTR_ERR(priv->regmap);
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	priv->base = devm_ioremap_resource(&pdev->dev, res);
-	if (!priv->base)
-		return -ENOMEM;
+	if (IS_ERR(priv->base))
+		return PTR_ERR(priv->base);
 
 	for_each_available_child_of_node(pdev->dev.of_node, child) {
 		struct mvebu_comphy_lane *lane;

[toc] | [next] | [standalone]


#1729381 — Re: [PATCH net] phy: mvebu-cp110: checking for NULL instead of IS_ERR()

FromDavid Miller <davem@davemloft.net>
Date2017-09-09 06:10 +0200
SubjectRe: [PATCH net] phy: mvebu-cp110: checking for NULL instead of IS_ERR()
Message-ID<unFfI-7P-5@gated-at.bofh.it>
In reply to#1728756
From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Fri, 8 Sep 2017 13:31:37 +0300

> devm_ioremap_resource() never returns NULL, it only returns error
> pointers so this test needs to be changed.
> 
> Fixes: d0438bd6aa09 ("phy: add the mvebu cp110 comphy driver")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> This driver apparently is going through the net tree, but netdev isn't
> listed as handling it in MAINTAINERS.  Kishon, do you know what's up
> with that?

Yeah let's sort this out before I apply this fix to my tree.

[toc] | [prev] | [next] | [standalone]


#1730184 — Re: [PATCH net] phy: mvebu-cp110: checking for NULL instead of IS_ERR()

FromKishon Vijay Abraham I <kishon@ti.com>
Date2017-09-11 09:30 +0200
SubjectRe: [PATCH net] phy: mvebu-cp110: checking for NULL instead of IS_ERR()
Message-ID<uorkl-87Q-3@gated-at.bofh.it>
In reply to#1729381
Hi,

On Saturday 09 September 2017 09:39 AM, David Miller wrote:
> From: Dan Carpenter <dan.carpenter@oracle.com>
> Date: Fri, 8 Sep 2017 13:31:37 +0300
> 
>> devm_ioremap_resource() never returns NULL, it only returns error
>> pointers so this test needs to be changed.
>>
>> Fixes: d0438bd6aa09 ("phy: add the mvebu cp110 comphy driver")
>> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>> ---
>> This driver apparently is going through the net tree, but netdev isn't
>> listed as handling it in MAINTAINERS.  Kishon, do you know what's up
>> with that?

I've reviewed this driver and sometimes the PHY drivers gets merged along with
their consumer driver (In this case mvpp2 ethernet driver). But after it's
merged, all further fixes and features go via linux-phy tree (mostly).
> 
> Yeah let's sort this out before I apply this fix to my tree.

I'll take this fix in linux-phy tree after -rc1 is tagged if that's okay with you.

Thanks
Kishon

[toc] | [prev] | [next] | [standalone]


#1730460 — Re: [PATCH net] phy: mvebu-cp110: checking for NULL instead of IS_ERR()

FromDavid Miller <davem@davemloft.net>
Date2017-09-11 19:30 +0200
SubjectRe: [PATCH net] phy: mvebu-cp110: checking for NULL instead of IS_ERR()
Message-ID<uoAH2-6oD-25@gated-at.bofh.it>
In reply to#1730184
From: Kishon Vijay Abraham I <kishon@ti.com>
Date: Mon, 11 Sep 2017 12:54:47 +0530

> On Saturday 09 September 2017 09:39 AM, David Miller wrote:
>> Yeah let's sort this out before I apply this fix to my tree.
> 
> I'll take this fix in linux-phy tree after -rc1 is tagged if that's okay with you.

No problem, although I don't see why one would delay bug fixes... ever.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web