Hello Florian Fainelli,

This is a semi-automatic email about new static checker warnings.

The patch 1c1008c793fa: "net: bcmgenet: add main driver file" from
Feb 13, 2014, leads to the following Smatch complaint:

drivers/net/ethernet/broadcom/genet/bcmgenet.c:2061 bcmgenet_open()
         warn: variable dereferenced before check 'priv->phydev' (see line 2014)

drivers/net/ethernet/broadcom/genet/bcmgenet.c
  2052          priv->crc_fwd_en = !!(reg & CMD_CRC_FWD);
  2053  
  2054          device_set_wakeup_capable(&dev->dev, 1);
  2055  
  2056          if (phy_is_internal(priv->phydev))
                                    ^^^^^^^^^^^^
Dereference.

  2057                  bcmgenet_power_up(priv, GENET_POWER_PASSIVE);
  2058  
  2059          netif_tx_start_all_queues(dev);
  2060  
  2061          if (priv->phydev)
                    ^^^^^^^^^^^^
Check.

  2062                  phy_start(priv->phydev);
  2063  

regards,
dan carpenter
_______________________________________________
kbuild mailing list
kbuild@lists.01.org
https://lists.01.org/mailman/listinfo/kbuild

Reply via email to