Skip to content

Commit

Permalink
net: sh_eth: tidyup compile warning
Browse files Browse the repository at this point in the history
This patch tidyup below warning

${LINUX}/drivers/net/sh_eth.c:1773: warning:
'mdp' may be used uninitialized in this function

Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Kuninori Morimoto authored and David S. Miller committed Jun 28, 2011
1 parent 72e85c4 commit ec0d755
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/sh_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -1888,7 +1888,7 @@ static int sh_eth_drv_probe(struct platform_device *pdev)

out_release:
/* net_dev free */
if (mdp->tsu_addr)
if (mdp && mdp->tsu_addr)
iounmap(mdp->tsu_addr);
if (ndev)
free_netdev(ndev);
Expand Down

0 comments on commit ec0d755

Please sign in to comment.