* [PATCH net] phy: mvebu-cp110: checking for NULL instead of IS_ERR()
@ 2017-09-08 10:31 Dan Carpenter
2017-09-09 4:09 ` David Miller
0 siblings, 1 reply; 4+ messages in thread
From: Dan Carpenter @ 2017-09-08 10:31 UTC (permalink / raw)
To: Kishon Vijay Abraham I, Antoine Tenart
Cc: netdev, kernel-janitors, linux-kernel, David S. Miller
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;
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH net] phy: mvebu-cp110: checking for NULL instead of IS_ERR()
2017-09-08 10:31 [PATCH net] phy: mvebu-cp110: checking for NULL instead of IS_ERR() Dan Carpenter
@ 2017-09-09 4:09 ` David Miller
2017-09-11 7:24 ` Kishon Vijay Abraham I
0 siblings, 1 reply; 4+ messages in thread
From: David Miller @ 2017-09-09 4:09 UTC (permalink / raw)
To: dan.carpenter
Cc: kishon, antoine.tenart, netdev, kernel-janitors, linux-kernel
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.
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH net] phy: mvebu-cp110: checking for NULL instead of IS_ERR()
2017-09-09 4:09 ` David Miller
@ 2017-09-11 7:24 ` Kishon Vijay Abraham I
2017-09-11 17:29 ` David Miller
0 siblings, 1 reply; 4+ messages in thread
From: Kishon Vijay Abraham I @ 2017-09-11 7:24 UTC (permalink / raw)
To: David Miller, dan.carpenter
Cc: antoine.tenart, netdev, kernel-janitors, linux-kernel
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-09-11 17:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-08 10:31 [PATCH net] phy: mvebu-cp110: checking for NULL instead of IS_ERR() Dan Carpenter
2017-09-09 4:09 ` David Miller
2017-09-11 7:24 ` Kishon Vijay Abraham I
2017-09-11 17:29 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).