sh_eth: check TSU registers ioremap() error
[linux-2.6-block.git] / drivers / net / ethernet / renesas / sh_eth.c
index c87862812ead7820e548fe22d482b304d76c2d4d..bf5e3cf97c4d89d55b92b66a46ee37787acb934c 100644 (file)
@@ -2446,6 +2446,11 @@ static int sh_eth_drv_probe(struct platform_device *pdev)
                }
                mdp->tsu_addr = ioremap(rtsu->start,
                                        resource_size(rtsu));
+               if (mdp->tsu_addr == NULL) {
+                       ret = -ENOMEM;
+                       dev_err(&pdev->dev, "TSU ioremap failed.\n");
+                       goto out_release;
+               }
                mdp->port = devno % 2;
                ndev->features = NETIF_F_HW_VLAN_FILTER;
        }