Thread (13 messages) 13 messages, 2 authors, 2014-10-22

Re: [PATCH net-next 5/6] ethernet: renesas: remove unnecessary check

From: Varka Bhadram <hidden>
Date: 2014-10-22 12:25:27

On 10/22/2014 05:17 PM, Sergei Shtylyov wrote:
On 10/22/2014 8:16 AM, Varka Bhadram wrote:
quoted
devm_ioremap_resource checks platform_get_resource() return value.
We can remove the duplicate check here.
quoted
Signed-off-by: Varka Bhadram <redacted>
---
  drivers/net/ethernet/renesas/sh_eth.c |    4 ----
  1 file changed, 4 deletions(-)
quoted
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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help