[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAH7P7NgZPS_AJtkaM661uGUD8rteora=EaGa4XzJZEY+vYr+6g@mail.gmail.com>
Date: Tue, 14 May 2013 09:09:13 +0200
From: Laurent Navet <laurent.navet@...il.com>
To: Frank Li <lznuaa@...il.com>
Cc: David Miller <davem@...emloft.net>,
"Frank.Li@...escale.com" <Frank.Li@...escale.com>,
Fabio Estevam <fabio.estevam@...escale.com>,
Shawn Guo <shawn.guo@...aro.org>, joe@...ches.com,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
kernel list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] net: ethernet: freescale: use devm_ioremap_resource()
>> --- a/drivers/net/ethernet/freescale/fec_main.c
>> +++ b/drivers/net/ethernet/freescale/fec_main.c
>> @@ -1843,8 +1843,6 @@ fec_probe(struct platform_device *pdev)
>> pdev->id_entry = of_id->data;
>>
>> r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>> - if (!r)
>> - return -ENXIO;
>>
>
> why remove this check?
it's already checked in devm_ioremap_resource in a better way,
void __iomem *devm_ioremap_resource(struct device *dev, struct resource *res)
{
...
if (!res || resource_type(res) != IORESOURCE_MEM) {
dev_err(dev, "invalid resource\n");
return ERR_PTR(-EINVAL);
}
...
Laurent.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists