[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5447A184.6080505@gmail.com>
Date: Wed, 22 Oct 2014 17:52:28 +0530
From: Varka Bhadram <varkabhadram@...il.com>
To: Sergei Shtylyov <sergei.shtylyov@...entembedded.com>,
netdev@...r.kernel.org
CC: Varka Bhadram <varkab@...c.in>
Subject: Re: [PATCH net-next 5/6] ethernet: renesas: remove unnecessary check
On 10/22/2014 05:17 PM, Sergei Shtylyov wrote:
> On 10/22/2014 8:16 AM, Varka Bhadram wrote:
>
>> devm_ioremap_resource checks platform_get_resource() return value.
>> We can remove the duplicate check here.
>
>> Signed-off-by: Varka Bhadram <varkab@...c.in>
>> ---
>> drivers/net/ethernet/renesas/sh_eth.c | 4 ----
>> 1 file changed, 4 deletions(-)
>
>> diff --git a/drivers/net/ethernet/renesas/sh_eth.c
>> b/drivers/net/ethernet/renesas/sh_eth.c
>> index 60e9c2c..d824ba5 100644
>> --- a/drivers/net/ethernet/renesas/sh_eth.c
>> +++ b/drivers/net/ethernet/renesas/sh_eth.c
>> @@ -2769,10 +2769,6 @@ static int sh_eth_drv_probe(struct
>> platform_device *pdev)
>>
>> /* get base addr */
>> res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>> - if (unlikely(res == NULL)) {
>> - dev_err(&pdev->dev, "invalid resource\n");
>> - return -EINVAL;
>> - }
>
> The driver dereferences 'res' further on, so you can't remove this
> check.
>
Yes its my mistake . I will fix it . Thankx
> WBR, Sergei
>
--
Regards,
Varka Bhadram.
--
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