From: Kuninori Morimoto Date: Thu, 23 Jun 2011 16:02:38 +0000 (+0000) Subject: net: sh_eth: tidyup compile warning X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ec0d75518cb06261f1823fa2713fe52b9b26455e;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git net: sh_eth: tidyup compile warning This patch tidyup below warning ${LINUX}/drivers/net/sh_eth.c:1773: warning: 'mdp' may be used uninitialized in this function Cc: Yoshihiro Shimoda Signed-off-by: Kuninori Morimoto Signed-off-by: David S. Miller --- diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c index 8a72a979ee71..96a629f1678e 100644 --- a/drivers/net/sh_eth.c +++ b/drivers/net/sh_eth.c @@ -1770,7 +1770,7 @@ static int sh_eth_drv_probe(struct platform_device *pdev) int ret, devno = 0; struct resource *res; struct net_device *ndev = NULL; - struct sh_eth_private *mdp; + struct sh_eth_private *mdp = NULL; struct sh_eth_plat_data *pd; /* get base addr */ @@ -1888,7 +1888,7 @@ out_unregister: out_release: /* net_dev free */ - if (mdp->tsu_addr) + if (mdp && mdp->tsu_addr) iounmap(mdp->tsu_addr); if (ndev) free_netdev(ndev);