* drivers/platform/x86/toshiba_bluetooth.c:261 toshiba_bt_rfkill_probe() warn: 'bt_dev->rfk' is an error pointer or valid
@ 2026-05-24 20:54 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-05-24 20:54 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp, Dan Carpenter
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: "Rafael J. Wysocki" <rjw@rjwysocki.net>
CC: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 6a97c4d5262d02f04d1f41113b0d090ea51f08dd
commit: 553b2ac59fbb434330287fde0cabc64bc6f11ceb platform/x86: toshiba_bluetooth: Convert ACPI driver to a platform one
date: 8 weeks ago
:::::: branch date: 63 minutes ago
:::::: commit date: 8 weeks ago
config: x86_64-randconfig-r072-20260524 (https://download.01.org/0day-ci/archive/20260525/202605250449.XRHrnanj-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
rustc: rustc 1.88.0 (6b00bc388 2025-06-23)
smatch: v0.5.0-9185-gbcc58b9c
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
| Fixes: 553b2ac59fbb ("platform/x86: toshiba_bluetooth: Convert ACPI driver to a platform one")
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202605250449.XRHrnanj-lkp@intel.com/
smatch warnings:
drivers/platform/x86/toshiba_bluetooth.c:261 toshiba_bt_rfkill_probe() warn: 'bt_dev->rfk' is an error pointer or valid
vim +261 drivers/platform/x86/toshiba_bluetooth.c
42b4e9ee3d1d3b Jes Sorensen 2009-12-16 230
553b2ac59fbb43 Rafael J. Wysocki 2026-03-24 231 static int toshiba_bt_rfkill_probe(struct platform_device *pdev)
42b4e9ee3d1d3b Jes Sorensen 2009-12-16 232 {
553b2ac59fbb43 Rafael J. Wysocki 2026-03-24 233 struct acpi_device *device = ACPI_COMPANION(&pdev->dev);
84c0691e514539 Azael Avalos 2015-05-03 234 struct toshiba_bluetooth_dev *bt_dev;
18b8696b66d790 Azael Avalos 2015-03-26 235 int result;
42b4e9ee3d1d3b Jes Sorensen 2009-12-16 236
18b8696b66d790 Azael Avalos 2015-03-26 237 result = toshiba_bluetooth_present(device->handle);
18b8696b66d790 Azael Avalos 2015-03-26 238 if (result)
18b8696b66d790 Azael Avalos 2015-03-26 239 return result;
18b8696b66d790 Azael Avalos 2015-03-26 240
18b8696b66d790 Azael Avalos 2015-03-26 241 pr_info("Toshiba ACPI Bluetooth device driver\n");
42b4e9ee3d1d3b Jes Sorensen 2009-12-16 242
bf4afc53b77aea Linus Torvalds 2026-02-21 243 bt_dev = kzalloc_obj(*bt_dev);
84c0691e514539 Azael Avalos 2015-05-03 244 if (!bt_dev)
84c0691e514539 Azael Avalos 2015-05-03 245 return -ENOMEM;
84c0691e514539 Azael Avalos 2015-05-03 246 bt_dev->acpi_dev = device;
553b2ac59fbb43 Rafael J. Wysocki 2026-03-24 247
553b2ac59fbb43 Rafael J. Wysocki 2026-03-24 248 platform_set_drvdata(pdev, bt_dev);
84c0691e514539 Azael Avalos 2015-05-03 249
84c0691e514539 Azael Avalos 2015-05-03 250 result = toshiba_bluetooth_sync_status(bt_dev);
84c0691e514539 Azael Avalos 2015-05-03 251 if (result) {
84c0691e514539 Azael Avalos 2015-05-03 252 kfree(bt_dev);
84c0691e514539 Azael Avalos 2015-05-03 253 return result;
84c0691e514539 Azael Avalos 2015-05-03 254 }
84c0691e514539 Azael Avalos 2015-05-03 255
7ee8cd3319d5e5 Azael Avalos 2015-05-03 256 bt_dev->rfk = rfkill_alloc("Toshiba Bluetooth",
553b2ac59fbb43 Rafael J. Wysocki 2026-03-24 257 &pdev->dev,
7ee8cd3319d5e5 Azael Avalos 2015-05-03 258 RFKILL_TYPE_BLUETOOTH,
7ee8cd3319d5e5 Azael Avalos 2015-05-03 259 &rfk_ops,
7ee8cd3319d5e5 Azael Avalos 2015-05-03 260 bt_dev);
7ee8cd3319d5e5 Azael Avalos 2015-05-03 @261 if (!bt_dev->rfk) {
7ee8cd3319d5e5 Azael Avalos 2015-05-03 262 pr_err("Unable to allocate rfkill device\n");
4315abf3383010 Rafael J. Wysocki 2026-03-24 263 result = -ENOMEM;
4315abf3383010 Rafael J. Wysocki 2026-03-24 264 goto err_free_bt_dev;
7ee8cd3319d5e5 Azael Avalos 2015-05-03 265 }
7ee8cd3319d5e5 Azael Avalos 2015-05-03 266
7ee8cd3319d5e5 Azael Avalos 2015-05-03 267 rfkill_set_hw_state(bt_dev->rfk, !bt_dev->killswitch);
7ee8cd3319d5e5 Azael Avalos 2015-05-03 268
7ee8cd3319d5e5 Azael Avalos 2015-05-03 269 result = rfkill_register(bt_dev->rfk);
7ee8cd3319d5e5 Azael Avalos 2015-05-03 270 if (result) {
7ee8cd3319d5e5 Azael Avalos 2015-05-03 271 pr_err("Unable to register rfkill device\n");
4315abf3383010 Rafael J. Wysocki 2026-03-24 272 goto err_rfkill_destroy;
7ee8cd3319d5e5 Azael Avalos 2015-05-03 273 }
42b4e9ee3d1d3b Jes Sorensen 2009-12-16 274
4315abf3383010 Rafael J. Wysocki 2026-03-24 275 result = acpi_dev_install_notify_handler(device, ACPI_DEVICE_NOTIFY,
4315abf3383010 Rafael J. Wysocki 2026-03-24 276 toshiba_bt_rfkill_notify, bt_dev);
4315abf3383010 Rafael J. Wysocki 2026-03-24 277 if (result) {
4315abf3383010 Rafael J. Wysocki 2026-03-24 278 pr_err("Unable to register ACPI notify handler\n");
4315abf3383010 Rafael J. Wysocki 2026-03-24 279 goto err_rfkill_unregister;
4315abf3383010 Rafael J. Wysocki 2026-03-24 280 }
4315abf3383010 Rafael J. Wysocki 2026-03-24 281
4315abf3383010 Rafael J. Wysocki 2026-03-24 282 return 0;
4315abf3383010 Rafael J. Wysocki 2026-03-24 283
4315abf3383010 Rafael J. Wysocki 2026-03-24 284 err_rfkill_unregister:
4315abf3383010 Rafael J. Wysocki 2026-03-24 285 rfkill_unregister(bt_dev->rfk);
4315abf3383010 Rafael J. Wysocki 2026-03-24 286 err_rfkill_destroy:
4315abf3383010 Rafael J. Wysocki 2026-03-24 287 rfkill_destroy(bt_dev->rfk);
4315abf3383010 Rafael J. Wysocki 2026-03-24 288 err_free_bt_dev:
4315abf3383010 Rafael J. Wysocki 2026-03-24 289 kfree(bt_dev);
42b4e9ee3d1d3b Jes Sorensen 2009-12-16 290 return result;
42b4e9ee3d1d3b Jes Sorensen 2009-12-16 291 }
42b4e9ee3d1d3b Jes Sorensen 2009-12-16 292
:::::: The code at line 261 was first introduced by commit
:::::: 7ee8cd3319d5e57b1b5e2b348f078af44e67a577 toshiba_bluetooth: Add RFKill handler functions
:::::: TO: Azael Avalos <coproscefalo@gmail.com>
:::::: CC: Darren Hart <dvhart@linux.intel.com>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-05-24 20:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-24 20:54 drivers/platform/x86/toshiba_bluetooth.c:261 toshiba_bt_rfkill_probe() warn: 'bt_dev->rfk' is an error pointer or valid kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox