[PATCH v4 1/5] net: ethernet: cpsw: switch to devres allocations

Daniel Mack zonque at gmail.com
Fri Aug 23 14:34:17 EDT 2013


On 23.08.2013 20:10, Sergei Shtylyov wrote:
> On 08/23/2013 06:16 PM, Daniel Mack wrote:

>>   	priv->coal_intvl = 0;
>>   	priv->bus_freq_mhz = clk_get_rate(priv->clk) / 1000000;
>>
>> -	priv->cpsw_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>> -	if (!priv->cpsw_res) {
>> +	ss_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>> +	if (!ss_res) {
> 
>     You don't need to check the result of platform_get_resource() if you call
> devm_ioremap_resource() right afterwards -- it will check resource ptr for 
> NULL the first thing. :-)

Thanks! Will address that in v5.


Daniel




More information about the linux-arm-kernel mailing list