tree: https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git pending-4.9 head: 21e2c9d65956fc7ddbcda40e4a99f74cf2346d50 commit: 8336fcda5993b96c3088b25f3d4a0310a9e9400b [16/20] arcnet: fix potential memory leak in com20020_probe() config: mips-allyesconfig compiler: mips-linux-gcc (GCC) 7.5.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git/commit/?id=8336fcda5993b96c3088b25f3d4a0310a9e9400b git remote add sashal-stable https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git git fetch --no-tags sashal-stable pending-4.9 git checkout 8336fcda5993b96c3088b25f3d4a0310a9e9400b # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-7.5.0 make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash arch/mips/kernel/ arch/mips/mm/ drivers/net/arcnet/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot All errors (new ones prefixed by >>): drivers/net/arcnet/com20020_cs.c: In function 'com20020_probe': >> drivers/net/arcnet/com20020_cs.c:153:2: error: implicit declaration of function 'free_arcdev'; did you mean 'free_netdev'? [-Werror=implicit-function-declaration] free_arcdev(dev); ^~~~~~~~~~~ free_netdev cc1: some warnings being treated as errors vim +153 drivers/net/arcnet/com20020_cs.c 110 111 static int com20020_probe(struct pcmcia_device *p_dev) 112 { 113 struct com20020_dev *info; 114 struct net_device *dev; 115 struct arcnet_local *lp; 116 int ret = -ENOMEM; 117 118 dev_dbg(&p_dev->dev, "com20020_attach()\n"); 119 120 /* Create new network device */ 121 info = kzalloc(sizeof(*info), GFP_KERNEL); 122 if (!info) 123 goto fail_alloc_info; 124 125 dev = alloc_arcdev(""); 126 if (!dev) 127 goto fail_alloc_dev; 128 129 lp = netdev_priv(dev); 130 lp->timeout = timeout; 131 lp->backplane = backplane; 132 lp->clockp = clockp; 133 lp->clockm = clockm & 3; 134 lp->hw.owner = THIS_MODULE; 135 136 /* fill in our module parameters as defaults */ 137 dev->dev_addr[0] = node; 138 139 p_dev->resource[0]->flags |= IO_DATA_PATH_WIDTH_8; 140 p_dev->resource[0]->end = 16; 141 p_dev->config_flags |= CONF_ENABLE_IRQ; 142 143 info->dev = dev; 144 p_dev->priv = info; 145 146 ret = com20020_config(p_dev); 147 if (ret) 148 goto fail_config; 149 150 return 0; 151 152 fail_config: > 153 free_arcdev(dev); 154 fail_alloc_dev: 155 kfree(info); 156 fail_alloc_info: 157 return ret; 158 } /* com20020_attach */ 159 -- 0-DAY CI Kernel Test Service https://01.org/lkp