tree:
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: a60b1e1fe9ca5f9d9a79e89a8d71228a8e04d35c
commit: 902a66e08ceaadb9a7a1ab3a4f3af611cd1d8cba [4603/5468] lan743x: correctly handle
chips with internal PHY
config: x86_64-randconfig-m001-20201111 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
drivers/net/ethernet/microchip/lan743x_main.c:1049 lan743x_phy_open() error: uninitialized
symbol 'phydev'.
vim +/phydev +1049 drivers/net/ethernet/microchip/lan743x_main.c
23f0703c125be49 Bryan Whitehead 2018-03-05 1019 static int lan743x_phy_open(struct
lan743x_adapter *adapter)
23f0703c125be49 Bryan Whitehead 2018-03-05 1020 {
23f0703c125be49 Bryan Whitehead 2018-03-05 1021 struct lan743x_phy *phy =
&adapter->phy;
6f197fb63850b26 Roelof Berg 2020-05-29 1022 struct device_node *phynode;
23f0703c125be49 Bryan Whitehead 2018-03-05 1023 struct phy_device *phydev;
23f0703c125be49 Bryan Whitehead 2018-03-05 1024 struct net_device *netdev;
23f0703c125be49 Bryan Whitehead 2018-03-05 1025 int ret = -EIO;
23f0703c125be49 Bryan Whitehead 2018-03-05 1026
23f0703c125be49 Bryan Whitehead 2018-03-05 1027 netdev = adapter->netdev;
6f197fb63850b26 Roelof Berg 2020-05-29 1028 phynode =
of_node_get(adapter->pdev->dev.of_node);
6f197fb63850b26 Roelof Berg 2020-05-29 1029
6f197fb63850b26 Roelof Berg 2020-05-29 1030 if (phynode) {
902a66e08ceaadb Sven Van Asbroeck 2020-11-08 1031 /* try devicetree phy, or fixed link
*/
6f197fb63850b26 Roelof Berg 2020-05-29 1032 of_get_phy_mode(phynode,
&adapter->phy_mode);
6f197fb63850b26 Roelof Berg 2020-05-29 1033
6f197fb63850b26 Roelof Berg 2020-05-29 1034 if (of_phy_is_fixed_link(phynode))
{
6f197fb63850b26 Roelof Berg 2020-05-29 1035 ret =
of_phy_register_fixed_link(phynode);
6f197fb63850b26 Roelof Berg 2020-05-29 1036 if (ret) {
6f197fb63850b26 Roelof Berg 2020-05-29 1037 netdev_err(netdev,
6f197fb63850b26 Roelof Berg 2020-05-29 1038 "cannot register fixed
PHY\n");
6f197fb63850b26 Roelof Berg 2020-05-29 1039 of_node_put(phynode);
6f197fb63850b26 Roelof Berg 2020-05-29 1040 goto return_error;
6f197fb63850b26 Roelof Berg 2020-05-29 1041 }
6f197fb63850b26 Roelof Berg 2020-05-29 1042 }
6f197fb63850b26 Roelof Berg 2020-05-29 1043 phydev = of_phy_connect(netdev,
phynode,
6f197fb63850b26 Roelof Berg 2020-05-29 1044 lan743x_phy_link_status_change,
0,
6f197fb63850b26 Roelof Berg 2020-05-29 1045 adapter->phy_mode);
6f197fb63850b26 Roelof Berg 2020-05-29 1046 of_node_put(phynode);
902a66e08ceaadb Sven Van Asbroeck 2020-11-08 1047 }
Not initialized on else path.
902a66e08ceaadb Sven Van Asbroeck 2020-11-08 1048
902a66e08ceaadb Sven Van Asbroeck 2020-11-08 @1049 if (!phydev) {
^^^^^^^
902a66e08ceaadb Sven Van Asbroeck 2020-11-08 1050 /* try internal phy */
23f0703c125be49 Bryan Whitehead 2018-03-05 1051 phydev =
phy_find_first(adapter->mdiobus);
23f0703c125be49 Bryan Whitehead 2018-03-05 1052 if (!phydev)
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org