From: Dan Carpenter Date: Tue, 24 Aug 2010 06:52:46 +0000 (+0000) Subject: pxa168_eth: remove unneeded null check X-Git-Tag: MMI-PSA29.97-13-9~22097^2~161 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4169591fd7c260b2b0b4e8f4d51f63f5b15ad78a;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git pxa168_eth: remove unneeded null check "pep->pd" isn't checked consistently in this function. For example it's dereferenced unconditionally on the next line after the end of the if condition. This function is only called from pxa168_eth_probe() and pep->pd is always non-NULL so I removed the check. Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller --- diff --git a/drivers/net/pxa168_eth.c b/drivers/net/pxa168_eth.c index ecc64d750cce..857a68115a5c 100644 --- a/drivers/net/pxa168_eth.c +++ b/drivers/net/pxa168_eth.c @@ -1414,10 +1414,8 @@ static int ethernet_phy_setup(struct net_device *dev) { struct pxa168_eth_private *pep = netdev_priv(dev); - if (pep->pd != NULL) { - if (pep->pd->init) - pep->pd->init(); - } + if (pep->pd->init) + pep->pd->init(); pep->phy = phy_scan(pep, pep->pd->phy_addr & 0x1f); if (pep->phy != NULL) phy_init(pep, pep->pd->speed, pep->pd->duplex);