From: kernel test robot <lkp@intel.com>
To: "Guangshuo Li" <lgs201920130244@gmail.com>,
"Dave Penkler" <dpenkler@gmail.com>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Dominik Karol Piątkowski"
<dominik.karol.piatkowski@protonmail.com>,
"Uwe Kleine-König (The Capable Hub)"
<u.kleine-koenig@baylibre.com>, "Kees Cook" <kees@kernel.org>,
linux-kernel@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev, stable@vger.kernel.org
Subject: Re: [PATCH] gpib: tnt4882: fix memory leak on probe failure
Date: Mon, 14 Sep 2026 06:16:20 +0800 [thread overview]
Message-ID: <202609140612.F8ICypXs-lkp@intel.com> (raw)
In-Reply-To: <20260913063603.1443403-1-lgs201920130244@gmail.com>
Hi Guangshuo,
kernel test robot noticed the following build warnings:
[auto build test WARNING on kees/for-next/kspp]
[also build test WARNING on linus/master kees/for-next/pstore v7.3-rc2 next-20260911]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Guangshuo-Li/gpib-tnt4882-fix-memory-leak-on-probe-failure/20260913-143603
base: https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git for-next/kspp
patch link: https://lore.kernel.org/r/20260913063603.1443403-1-lgs201920130244%40gmail.com
patch subject: [PATCH] gpib: tnt4882: fix memory leak on probe failure
config: x86_64-randconfig-r133-20260914 (https://download.01.org/0day-ci/archive/20260914/202609140612.F8ICypXs-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260914/202609140612.F8ICypXs-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202609140612.F8ICypXs-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/gpib/tnt4882/tnt4882_gpib.c: In function 'ni_gpib_probe':
drivers/gpib/tnt4882/tnt4882_gpib.c:1588:9: error: 'ret' undeclared (first use in this function); did you mean 'net'?
1588 | ret = ni_gpib_config(link);
| ^~~
| net
drivers/gpib/tnt4882/tnt4882_gpib.c:1588:9: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/gpib/tnt4882/tnt4882_gpib.c:1595:1: warning: control reaches end of non-void function [-Wreturn-type]
1595 | }
| ^
vim +1595 drivers/gpib/tnt4882/tnt4882_gpib.c
0cd5b05551e0224 drivers/staging/gpib/tnt4882/tnt4882_gpib.c Dave Penkler 2024-09-18 1557
0cd5b05551e0224 drivers/staging/gpib/tnt4882/tnt4882_gpib.c Dave Penkler 2024-09-18 1558 /*
0cd5b05551e0224 drivers/staging/gpib/tnt4882/tnt4882_gpib.c Dave Penkler 2024-09-18 1559 * ni_gpib_probe() creates an "instance" of the driver, allocating
0cd5b05551e0224 drivers/staging/gpib/tnt4882/tnt4882_gpib.c Dave Penkler 2024-09-18 1560 * local data structures for one device. The device is registered
0cd5b05551e0224 drivers/staging/gpib/tnt4882/tnt4882_gpib.c Dave Penkler 2024-09-18 1561 * with Card Services.
0cd5b05551e0224 drivers/staging/gpib/tnt4882/tnt4882_gpib.c Dave Penkler 2024-09-18 1562 */
0cd5b05551e0224 drivers/staging/gpib/tnt4882/tnt4882_gpib.c Dave Penkler 2024-09-18 1563
0cd5b05551e0224 drivers/staging/gpib/tnt4882/tnt4882_gpib.c Dave Penkler 2024-09-18 1564 static int ni_gpib_probe(struct pcmcia_device *link)
0cd5b05551e0224 drivers/staging/gpib/tnt4882/tnt4882_gpib.c Dave Penkler 2024-09-18 1565 {
0cd5b05551e0224 drivers/staging/gpib/tnt4882/tnt4882_gpib.c Dave Penkler 2024-09-18 1566 struct local_info_t *info;
fc2c620c3924f26 drivers/staging/gpib/tnt4882/tnt4882_gpib.c Michael Rubin 2025-03-19 1567 //struct struct gpib_board *dev;
0cd5b05551e0224 drivers/staging/gpib/tnt4882/tnt4882_gpib.c Dave Penkler 2024-09-18 1568
0cd5b05551e0224 drivers/staging/gpib/tnt4882/tnt4882_gpib.c Dave Penkler 2024-09-18 1569 /* Allocate space for private device-specific data */
bf4afc53b77aeaa drivers/gpib/tnt4882/tnt4882_gpib.c Linus Torvalds 2026-02-21 1570 info = kzalloc_obj(*info);
0cd5b05551e0224 drivers/staging/gpib/tnt4882/tnt4882_gpib.c Dave Penkler 2024-09-18 1571 if (!info)
0cd5b05551e0224 drivers/staging/gpib/tnt4882/tnt4882_gpib.c Dave Penkler 2024-09-18 1572 return -ENOMEM;
0cd5b05551e0224 drivers/staging/gpib/tnt4882/tnt4882_gpib.c Dave Penkler 2024-09-18 1573
0cd5b05551e0224 drivers/staging/gpib/tnt4882/tnt4882_gpib.c Dave Penkler 2024-09-18 1574 info->p_dev = link;
0cd5b05551e0224 drivers/staging/gpib/tnt4882/tnt4882_gpib.c Dave Penkler 2024-09-18 1575 link->priv = info;
0cd5b05551e0224 drivers/staging/gpib/tnt4882/tnt4882_gpib.c Dave Penkler 2024-09-18 1576
0cd5b05551e0224 drivers/staging/gpib/tnt4882/tnt4882_gpib.c Dave Penkler 2024-09-18 1577 /*
0cd5b05551e0224 drivers/staging/gpib/tnt4882/tnt4882_gpib.c Dave Penkler 2024-09-18 1578 * General socket configuration defaults can go here. In this
0cd5b05551e0224 drivers/staging/gpib/tnt4882/tnt4882_gpib.c Dave Penkler 2024-09-18 1579 * client, we assume very little, and rely on the CIS for almost
0cd5b05551e0224 drivers/staging/gpib/tnt4882/tnt4882_gpib.c Dave Penkler 2024-09-18 1580 * everything. In most clients, many details (i.e., number, sizes,
0cd5b05551e0224 drivers/staging/gpib/tnt4882/tnt4882_gpib.c Dave Penkler 2024-09-18 1581 * and attributes of IO windows) are fixed by the nature of the
0cd5b05551e0224 drivers/staging/gpib/tnt4882/tnt4882_gpib.c Dave Penkler 2024-09-18 1582 * device, and can be hard-wired here.
0cd5b05551e0224 drivers/staging/gpib/tnt4882/tnt4882_gpib.c Dave Penkler 2024-09-18 1583 */
0cd5b05551e0224 drivers/staging/gpib/tnt4882/tnt4882_gpib.c Dave Penkler 2024-09-18 1584 link->config_flags = CONF_ENABLE_IRQ | CONF_AUTO_SET_IO;
0cd5b05551e0224 drivers/staging/gpib/tnt4882/tnt4882_gpib.c Dave Penkler 2024-09-18 1585
0cd5b05551e0224 drivers/staging/gpib/tnt4882/tnt4882_gpib.c Dave Penkler 2024-09-18 1586 /* Register with Card Services */
0cd5b05551e0224 drivers/staging/gpib/tnt4882/tnt4882_gpib.c Dave Penkler 2024-09-18 1587 curr_dev = link;
4d0c779a70d29c2 drivers/gpib/tnt4882/tnt4882_gpib.c Guangshuo Li 2026-09-13 1588 ret = ni_gpib_config(link);
4d0c779a70d29c2 drivers/gpib/tnt4882/tnt4882_gpib.c Guangshuo Li 2026-09-13 1589 if (ret) {
4d0c779a70d29c2 drivers/gpib/tnt4882/tnt4882_gpib.c Guangshuo Li 2026-09-13 1590 kfree(info);
4d0c779a70d29c2 drivers/gpib/tnt4882/tnt4882_gpib.c Guangshuo Li 2026-09-13 1591 link->priv = NULL;
4d0c779a70d29c2 drivers/gpib/tnt4882/tnt4882_gpib.c Guangshuo Li 2026-09-13 1592 }
4d0c779a70d29c2 drivers/gpib/tnt4882/tnt4882_gpib.c Guangshuo Li 2026-09-13 1593
4d0c779a70d29c2 drivers/gpib/tnt4882/tnt4882_gpib.c Guangshuo Li 2026-09-13 1594 return ret;
0cd5b05551e0224 drivers/staging/gpib/tnt4882/tnt4882_gpib.c Dave Penkler 2024-09-18 @1595 }
0cd5b05551e0224 drivers/staging/gpib/tnt4882/tnt4882_gpib.c Dave Penkler 2024-09-18 1596
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2026-09-13 22:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-13 6:36 Guangshuo Li
2026-09-13 21:22 ` kernel test robot
2026-09-13 22:16 ` kernel test robot [this message]
2026-09-14 6:06 ` kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202609140612.F8ICypXs-lkp@intel.com \
--to=lkp@intel.com \
--cc=dominik.karol.piatkowski@protonmail.com \
--cc=dpenkler@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=kees@kernel.org \
--cc=lgs201920130244@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=stable@vger.kernel.org \
--cc=u.kleine-koenig@baylibre.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®