* [linux-next:master 4603/5468] drivers/net/ethernet/microchip/lan743x_main.c:1049 lan743x_phy_open() error: uninitialized symbol 'phydev'.
@ 2020-11-13 13:24 Dan Carpenter
2020-11-13 15:28 ` Jakub Kicinski
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2020-11-13 13:24 UTC (permalink / raw)
To: kbuild, Sven Van Asbroeck
Cc: lkp, Dan Carpenter, kbuild-all, Linux Memory Management List,
Jakub Kicinski, Andrew Lunn
[-- Attachment #1: Type: text/plain, Size: 3538 bytes --]
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@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@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
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 35307 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [linux-next:master 4603/5468] drivers/net/ethernet/microchip/lan743x_main.c:1049 lan743x_phy_open() error: uninitialized symbol 'phydev'.
2020-11-13 13:24 [linux-next:master 4603/5468] drivers/net/ethernet/microchip/lan743x_main.c:1049 lan743x_phy_open() error: uninitialized symbol 'phydev' Dan Carpenter
@ 2020-11-13 15:28 ` Jakub Kicinski
0 siblings, 0 replies; 2+ messages in thread
From: Jakub Kicinski @ 2020-11-13 15:28 UTC (permalink / raw)
To: Dan Carpenter
Cc: kbuild, Sven Van Asbroeck, lkp, Dan Carpenter, kbuild-all,
Linux Memory Management List, Andrew Lunn
On Fri, 13 Nov 2020 16:24:03 +0300 Dan Carpenter wrote:
> 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@intel.com>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Thanks, this is already fixes in net and Linus's tree:
edbc21113bde ("lan743x: fix use of uninitialized variable")
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-11-13 15:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-13 13:24 [linux-next:master 4603/5468] drivers/net/ethernet/microchip/lan743x_main.c:1049 lan743x_phy_open() error: uninitialized symbol 'phydev' Dan Carpenter
2020-11-13 15:28 ` Jakub Kicinski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).