Re: [PATCH v6] Input: psxpad-spi - Add PlayStation 1/2 joypads via SPI interface Driver
From: kbuild test robot
Date: Sun Apr 30 2017 - 00:14:26 EST
Hi Tomohiro,
[auto build test WARNING on input/next]
[also build test WARNING on v4.11-rc8 next-20170428]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Tomohiro-Yoshidomi/Input-psxpad-spi-Add-PlayStation-1-2-joypads-via-SPI-interface-Driver/20170430-114033
base: https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git next
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 6.2.0
reproduce:
wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=ia64
Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings
All warnings (new ones prefixed by >>):
drivers/input/joystick/psxpad-spi.c: In function 'psxpad_spi_probe':
>> drivers/input/joystick/psxpad-spi.c:319:3: warning: 'err' may be used uninitialized in this function [-Wmaybe-uninitialized]
dev_err(&spi->dev,
^~~~~~~~~~~~~~~~~~
"%s: failed to pdev alloc mode: %d\n",
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
__func__, err);
~~~~~~~~~~~~~~
vim +/err +319 drivers/input/joystick/psxpad-spi.c
303 return 0;
304 }
305 #endif /* CONFIG_JOYSTICK_PSXPAD_SPI_FF */
306
307 static int psxpad_spi_probe(struct spi_device *spi)
308 {
309 struct psxpad *pad;
310 struct input_polled_dev *pdev;
311 struct input_dev *idev;
312 int err;
313
314 pad = devm_kzalloc(&spi->dev, sizeof(struct psxpad), GFP_KERNEL);
315 if (!pad)
316 return -ENOMEM;
317 pdev = input_allocate_polled_device();
318 if (!pdev) {
> 319 dev_err(&spi->dev,
320 "%s: failed to pdev alloc mode: %d\n",
321 __func__, err);
322 return -ENOMEM;
323 }
324
325 /* input poll device settings */
326 pad->pdev = pdev;
327 pad->spi = spi;
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip