| Seq | Timestamp | Type | Name | Duration |
|---|---|---|---|---|
| 0/0 | 2026/09/18 08:04 | flow | patch-triage |
3mArgs:null Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"KMSANReasoning": "",
"NeedsKMSAN": false,
"Reasoning": "The patch modifies the probe routine of the STMicroelectronics VL53L0X Time-of-Flight distance sensor driver (drivers/iio/proximity/vl53l0x-i2c.c), reordering the trigger reference assignment under an IRQ check. This driver controls physical I2C sensor hardware that is not emulated in standard QEMU/GCE fuzzing environments, making the modified code structurally unreachable.",
"WorthFuzzing": false
} |
| 1/1 | 2026/09/18 08:04 | action | read-patch-diff |
0mArgs:null Results: {
"PatchDiff": "commit 72fa7152d707edf7e9a60497be272a9cb5e52998\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate: Fri Sep 18 08:04:24 2026 +0000\n\n syz-cluster: applied patch under review\n\ndiff --git a/drivers/iio/proximity/vl53l0x-i2c.c b/drivers/iio/proximity/vl53l0x-i2c.c\nindex ad3e46d47fa8d..abef4129e645f 100644\n--- a/drivers/iio/proximity/vl53l0x-i2c.c\n+++ b/drivers/iio/proximity/vl53l0x-i2c.c\n@@ -374,8 +374,6 @@ static int vl53l0x_probe(struct i2c_client *client)\n \t\tif (ret)\n \t\t\treturn ret;\n \n-\t\tindio_dev-\u003etrig = iio_trigger_get(data-\u003etrig);\n-\n \t\tret = vl53l0x_configure_irq(client, indio_dev);\n \t\tif (ret)\n \t\t\treturn ret;\n@@ -387,6 +385,8 @@ static int vl53l0x_probe(struct i2c_client *client)\n \t\t\t\t\t\u0026iio_triggered_buffer_setup_ops);\n \t\tif (ret)\n \t\t\treturn ret;\n+\n+\t\tindio_dev-\u003etrig = iio_trigger_get(data-\u003etrig);\n \t}\n \n \treturn devm_iio_device_register(\u0026client-\u003edev, indio_dev);\n"
} |
| 2/1 | 2026/09/18 08:04 | agent | patch-evaluator |
3mModel:core Args: null Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"Reasoning": "The patch modifies the probe routine of the STMicroelectronics VL53L0X Time-of-Flight distance sensor driver (drivers/iio/proximity/vl53l0x-i2c.c), reordering the trigger reference assignment under an IRQ check. This driver controls physical I2C sensor hardware that is not emulated in standard QEMU/GCE fuzzing environments, making the modified code structurally unreachable.",
"WorthFuzzing": false
}Instruction: You are an expert Linux kernel maintainer and security engineer.
Your job is to review a provided patch series and evaluate whether it warrants fuzzing with syzkaller.
IMPORTANT: The changes have ALREADY been applied and committed as the HEAD commit in
your workspace. Do NOT rely on internal assumptions. You must actively use your code access
tools to inspect the actual source code, callers, and surrounding context.
================================================================================
1. CORE TRIAGE PHILOSOPHY
================================================================================
The goal of patch fuzzing is to discover crashes, regressions, exposed latent bugs,
and newly triggered assertions introduced by the patch series.
- REACHABILITY IS THE PRIMARY GATE:
Fuzzing can only discover bugs in code that can actually execute in standard virtualized
environments (GCE or QEMU, utilizing software-emulated devices like USB gadgets, netdev, tun/tap).
If the modified code is structurally unreachable (see Section 2), it MUST NOT be fuzzed,
regardless of whether it adds assertions or complex logic.
- DO NOT BLINDLY TRUST "NO FUNCTIONAL CHANGE" (NFCI) OR "REFACTORING" CLAIMS:
Patch authors routinely label changes as "cleanups", "refactorings", or state
"No functional change intended". Do NOT take these claims at face value.
Code refactorings that rearrange logic, introduce helper functions, or alter state management
in core subsystems frequently introduce subtle semantic shifts or uncover latent kernel bugs.
If reachable executable code is modified or refactored, it MUST be fuzzed.
- NEW OR MODIFIED ASSERTIONS IN REACHABLE CODE MUST BE FUZZED:
When a patch introduces or modifies runtime checks or assertions (e.g., WARN_ON*, VM_WARN_ON*,
BUG_ON*, lockdep_assert*) in reachable code paths, it enforces new or stricter invariants.
Even if the author believes the invariant always holds, fuzzing is essential to verify whether
an unusual sequence of operations can violate it.
================================================================================
2. WHEN TO RETURN WorthFuzzing=false (NEGATIVE CRITERIA)
================================================================================
Return WorthFuzzing=false ONLY IF all modified code falls strictly into one or more of these categories:
- Non-kernel and non-executable changes:
* Modifications to Documentation/, comments, or spelling fixes.
* User-space directories, self-tests, samples, or scripts (e.g., tools/, samples/, scripts/, usr/)
that do not affect the compiled kernel image (vmlinux) or kernel modules.
* Purely decorative logging (e.g., message strings in pr_err, printk, dev_info) or tracepoints
that do not alter control flow or data structures.
* Build system or Kconfig changes that do not alter compiled C logic.
- Structurally unreachable hardware:
* Vendor-specific PCIe switches, SmartNICs, or GPU drivers (e.g., mlxsw, pds_core, qed,
ionic, amdgpu) requiring physical ASIC/PCIe cards not emulated in standard QEMU.
- Unreachable execution paths:
* Driver teardown callbacks (.remove, .shutdown, pci_unregister_driver) executed only during
physical PCI hot-unplug or manual sysfs driver unbinding.
* Code paths exclusive to architectures other than the target architecture.
================================================================================
3. WHEN TO RETURN WorthFuzzing=true (POSITIVE CRITERIA)
================================================================================
Return WorthFuzzing=true whenever the patch touches reachable executable code, including:
- Core Subsystems:
* Any logic modifications in memory management (mm/), synchronization/locking (kernel/locking/),
BPF, scheduler, core networking, VFS, or syscall handling.
- Refactorings and Code Cleanups:
* Any restructuring of reachable data structures, helper abstractions, or algorithm flows.
- Runtime Assertions and Defensive Checks:
* Any introduction or alteration of assertions (WARN_ON*, VM_WARN_ON*, BUG_ON*, etc.) in reachable paths.
- Reachable Drivers and Protocols:
* Drivers accessible via virtual buses (virtio, USB gadget, loopback, netlink, binder, sockets, etc.).
================================================================================
4. EXTRACTING FocusSymbols (PREVENTING DILUTION)
================================================================================
When WorthFuzzing=true, you must extract specific kernel functions into FocusSymbols to guide the fuzzer:
- AVOID UBIQUITOUS LIFECYCLE HOT-PATHS:
Do NOT list generic, ubiquitous functions called by almost every program in the corpus
(including, but not limited to: general memory allocators and deallocators, page fault
and trap handlers, or core synchronization primitives; this is not an exhaustive list).
Listing ubiquitous functions causes the fuzzer to classify thousands of unrelated tests as "focused",
which severely dilutes fuzzing effort away from the actual changes.
- TARGET SPECIFIC FEATURE LOGIC AND ENTRYPOINTS:
List functions that specifically implement the logic being added or altered, or direct API entrypoints
for the subsystem feature under review.
- HANDLING STATIC INLINE FUNCTIONS IN HEADERS (.h):
Compiler-inlined static functions (such as static inlines in mm/*.h or include/linux/*.h) lack
distinct symbol addresses in vmlinux and cannot be targeted directly by symbol coverage filters.
If the changes are primarily in static inline helpers, identify non-static, feature-specific caller
functions in .c files that exercise them (avoiding ubiquitous lifecycle wrappers).
================================================================================
5. IDENTIFYING EnableConfigs
================================================================================
Identify any specific CONFIG_ options required to properly compile and reach the modified code:
- Inspect Kconfig files and #ifdef guards; do not make assumptions.
- Check "depends on" lines in Kconfig to include any non-standard parent subsystem configs needed.
- Strip any 'CONFIG_' prefix (e.g., return "NET_IPV4" instead of "CONFIG_NET_IPV4").
Prefer calling several tools at the same time to save round-trips.
Use set-results tool to provide results of the analysis.
It must be called exactly once before the final reply.
Ignore results of this tool.
Prompt: Target architecture: amd64
For your convenience, here is the diff of the changes:
commit 72fa7152d707edf7e9a60497be272a9cb5e52998
Author: syz-cluster <triage@syzkaller.com>
Date: Fri Sep 18 08:04:24 2026 +0000
syz-cluster: applied patch under review
diff --git a/drivers/iio/proximity/vl53l0x-i2c.c b/drivers/iio/proximity/vl53l0x-i2c.c
index ad3e46d47fa8d..abef4129e645f 100644
--- a/drivers/iio/proximity/vl53l0x-i2c.c
+++ b/drivers/iio/proximity/vl53l0x-i2c.c
@@ -374,8 +374,6 @@ static int vl53l0x_probe(struct i2c_client *client)
if (ret)
return ret;
- indio_dev->trig = iio_trigger_get(data->trig);
-
ret = vl53l0x_configure_irq(client, indio_dev);
if (ret)
return ret;
@@ -387,6 +385,8 @@ static int vl53l0x_probe(struct i2c_client *client)
&iio_triggered_buffer_setup_ops);
if (ret)
return ret;
+
+ indio_dev->trig = iio_trigger_get(data->trig);
}
return devm_iio_device_register(&client->dev, indio_dev);
|
| 3/2 | 2026/09/18 08:04 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 3014 output: 47 thoughts: 865 Thoughts: **Analyzing the VL53L0X I2C Driver Patch** Okay, so I'm looking at this patch for the VL53L0X proximity sensor driver. The diff is pretty straightforward; it seems to be rearranging the assignment of the IIO trigger. Specifically, the line `indio_dev->trig = iio_trigger_get(data->trig);` has been moved from before the triggered buffer setup to *after* it. Hmm, interesting. Before I give this a "worth fuzzing" assessment, I need to understand the reachability. First, let's establish context: where does `vl53l0x-i2c.c` live in the grand scheme of things? Is it reachable in standard fuzzing environments like QEMU or GCE? That's a key question. How are I2C devices, in general, probed and instantiated within the kernel? Can they be created dynamically from userspace through sysfs (e.g., `/sys/bus/i2c/devices/i2c-X/new_device`) or using i2c-dev ioctls like `I2C_SLAVE`? Essentially, can these I2C clients be instantiated on the fly? Ah, right! I remember now; I2C devices *can* be instantiated dynamically in Linux using `i2c-dev` or the sysfs `new_device` interface. That means *arbitrary* I2C client devices can be created! Now the follow-up question: can Syzkaller take advantage of this to create an I2C client device? Or does it have some sort of I2C bus abstraction, a dummy implementation, etc.? I need to check the Syzkaller rules and previous examples. But wait, let's also keep an eye on the negative criteria for "worth fuzzing." I need to rule out the possibility that the code is structurally unreachable. For instance, is the VL53L0X hardware itself unreachable? Specifically, does the negative criteria apply to I2C sensors? Does this driver require hardware or can it be emulated? Are I2C sensors considered unreachable hardware? Before I jump to a conclusion, let's take a closer look at the code in `vl53l0x-i2c.c`, specifically the `vl53l0x_probe` function. I need to understand what this function does and how it's called to gauge the reachability of the modified code. This should help to confirm my assumptions and guide my assessment. |
| 4/2 | 2026/09/18 08:04 | tool | read-file |
0mArgs:{
"File": "drivers/iio/proximity/vl53l0x-i2c.c",
"FirstLine": 330,
"LineCount": 70
}Results: {
"Contents": " 330:\t\tif (ret \u003c 0)\n 331:\t\t\treturn -EINVAL;\n 332:\t\n 333:\t\tif (ret != VL53L0X_MODEL_ID_VAL)\n 334:\t\t\tdev_info(\u0026client-\u003edev, \"Unknown model id: 0x%x\", ret);\n 335:\t\n 336:\t\tdata-\u003evdd_supply = devm_regulator_get(\u0026client-\u003edev, \"vdd\");\n 337:\t\tif (IS_ERR(data-\u003evdd_supply))\n 338:\t\t\treturn dev_err_probe(\u0026client-\u003edev, PTR_ERR(data-\u003evdd_supply),\n 339:\t\t\t\t\t \"Unable to get VDD regulator\\n\");\n 340:\t\n 341:\t\tdata-\u003ereset_gpio = devm_gpiod_get_optional(\u0026client-\u003edev, \"reset\", GPIOD_OUT_HIGH);\n 342:\t\tif (IS_ERR(data-\u003ereset_gpio))\n 343:\t\t\treturn dev_err_probe(\u0026client-\u003edev, PTR_ERR(data-\u003ereset_gpio),\n 344:\t\t\t\t\t \"Cannot get reset GPIO\\n\");\n 345:\t\n 346:\t\tret = vl53l0x_power_on(data);\n 347:\t\tif (ret)\n 348:\t\t\treturn dev_err_probe(\u0026client-\u003edev, ret,\n 349:\t\t\t\t\t \"Failed to power on the chip\\n\");\n 350:\t\n 351:\t\tret = devm_add_action_or_reset(\u0026client-\u003edev, vl53l0x_power_off, data);\n 352:\t\tif (ret)\n 353:\t\t\treturn ret;\n 354:\t\n 355:\t\tindio_dev-\u003ename = \"vl53l0x\";\n 356:\t\tindio_dev-\u003einfo = \u0026vl53l0x_info;\n 357:\t\tindio_dev-\u003echannels = vl53l0x_channels;\n 358:\t\tindio_dev-\u003enum_channels = ARRAY_SIZE(vl53l0x_channels);\n 359:\t\tindio_dev-\u003emodes = INDIO_DIRECT_MODE;\n 360:\t\n 361:\t\t/* usage of interrupt is optional */\n 362:\t\tif (client-\u003eirq) {\n 363:\t\t\tinit_completion(\u0026data-\u003ecompletion);\n 364:\t\n 365:\t\t\tdata-\u003etrig = devm_iio_trigger_alloc(\u0026client-\u003edev, \"%s-dev%d\",\n 366:\t\t\t\t\t\t\tindio_dev-\u003ename,\n 367:\t\t\t\t\t\t\tiio_device_id(indio_dev));\n 368:\t\t\tif (!data-\u003etrig)\n 369:\t\t\t\treturn -ENOMEM;\n 370:\t\n 371:\t\t\tdata-\u003etrig-\u003eops = \u0026vl53l0x_trigger_ops;\n 372:\t\t\tiio_trigger_set_drvdata(data-\u003etrig, indio_dev);\n 373:\t\t\tret = devm_iio_trigger_register(\u0026client-\u003edev, data-\u003etrig);\n 374:\t\t\tif (ret)\n 375:\t\t\t\treturn ret;\n 376:\t\n 377:\t\t\tret = vl53l0x_configure_irq(client, indio_dev);\n 378:\t\t\tif (ret)\n 379:\t\t\t\treturn ret;\n 380:\t\n 381:\t\t\tret = devm_iio_triggered_buffer_setup(\u0026client-\u003edev,\n 382:\t\t\t\t\t\tindio_dev,\n 383:\t\t\t\t\t\tNULL,\n 384:\t\t\t\t\t\t\u0026vl53l0x_trigger_handler,\n 385:\t\t\t\t\t\t\u0026iio_triggered_buffer_setup_ops);\n 386:\t\t\tif (ret)\n 387:\t\t\t\treturn ret;\n 388:\t\n 389:\t\t\tindio_dev-\u003etrig = iio_trigger_get(data-\u003etrig);\n 390:\t\t}\n 391:\t\n 392:\t\treturn devm_iio_device_register(\u0026client-\u003edev, indio_dev);\n 393:\t}\n 394:\t\n 395:\tstatic const struct i2c_device_id vl53l0x_id[] = {\n 396:\t\t{ \"vl53l0x\" },\n 397:\t\t{ }\n 398:\t};\n 399:\tMODULE_DEVICE_TABLE(i2c, vl53l0x_id);\n"
} |
| 5/2 | 2026/09/18 08:04 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 5653 output: 47 thoughts: 47 Thoughts: Okay, here's my interpretation of that request, formatted as requested: **Diving into the VL53L0X Driver** Right, let's get down to brass tacks. I need to take a look at the `drivers/iio/proximity/vl53l0x-i2c.c` file. Specifically, I'm focusing in on lines 320 to 335. Before I get right to those lines, though, it's probably best to have some context. I'll read lines 300 through 335 to give myself the full picture. I know this driver, so I suspect something interesting is happening in that section. Time to dig in and see what's what. |
| 6/2 | 2026/09/18 08:04 | tool | read-file |
0mArgs:{
"File": "drivers/iio/proximity/vl53l0x-i2c.c",
"FirstLine": 300,
"LineCount": 35
}Results: {
"Contents": " 300:\t\n 301:\tstatic const struct iio_buffer_setup_ops iio_triggered_buffer_setup_ops = {\n 302:\t\t.postenable = \u0026vl53l0x_buffer_postenable,\n 303:\t\t.postdisable = \u0026vl53l0x_buffer_postdisable,\n 304:\t};\n 305:\t\n 306:\tstatic const struct iio_trigger_ops vl53l0x_trigger_ops = {\n 307:\t\t.validate_device = iio_trigger_validate_own_device,\n 308:\t};\n 309:\t\n 310:\tstatic int vl53l0x_probe(struct i2c_client *client)\n 311:\t{\n 312:\t\tstruct vl53l0x_data *data;\n 313:\t\tstruct iio_dev *indio_dev;\n 314:\t\tint ret;\n 315:\t\n 316:\t\tindio_dev = devm_iio_device_alloc(\u0026client-\u003edev, sizeof(*data));\n 317:\t\tif (!indio_dev)\n 318:\t\t\treturn -ENOMEM;\n 319:\t\n 320:\t\tdata = iio_priv(indio_dev);\n 321:\t\tdata-\u003eclient = client;\n 322:\t\ti2c_set_clientdata(client, indio_dev);\n 323:\t\n 324:\t\tif (!i2c_check_functionality(client-\u003eadapter,\n 325:\t\t\t\t\t I2C_FUNC_SMBUS_READ_I2C_BLOCK |\n 326:\t\t\t\t\t I2C_FUNC_SMBUS_BYTE_DATA))\n 327:\t\t\treturn -EOPNOTSUPP;\n 328:\t\n 329:\t\tret = i2c_smbus_read_byte_data(data-\u003eclient, VL_REG_IDENTIFICATION_MODEL_ID);\n 330:\t\tif (ret \u003c 0)\n 331:\t\t\treturn -EINVAL;\n 332:\t\n 333:\t\tif (ret != VL53L0X_MODEL_ID_VAL)\n 334:\t\t\tdev_info(\u0026client-\u003edev, \"Unknown model id: 0x%x\", ret);\n"
} |
| 7/2 | 2026/09/18 08:04 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 6514 output: 37 thoughts: 1954 Thoughts: **Assessing the Fuzzability of a VL53L0X I2C Driver Patch** Alright, let's break this down. We have a patch touching the `vl53l0x_probe` function, an I2C driver for a Time-of-Flight sensor. The initial check is straightforward: it's attempting an SMBus read, which immediately flags it as a hardware interaction. My immediate thought is: can QEMU emulate this? Nope. QEMU doesn't have a VL53L0X model. This is critical. The core question then becomes: is this structurally *unreachable* hardware in a standard fuzzing environment? Syzkaller is the tool, and its effectiveness hinges on reachability. The presence of `/sys/bus/i2c/...` is the key – it *looks* like an entry point, but it's useless if the underlying hardware (or emulation thereof) isn't present. Okay, let's consider possibilities. Could a USB-to-I2C adapter be used? Even with a gadget like CP2112, we're still fundamentally missing the VL53L0X *itself*. Syzkaller needs a corresponding physical device or a robust emulation. A simple adapter is not enough. Then there's `i2c-stub`. Can *it* respond in a meaningful way? Does Syzkaller even leverage `i2c-stub` for this specific sensor? The critical part is the chip register emulation; the basic stub is not sufficient, and it would need to be configured/fuzzed. The next thought is to investigate further: let's dive into the syzlang specs or hardware driver treatment in the triage process. Checking the syzkaller documentation or git logs for relevant commits is the next logical step. The available tools are grepper (which is, effectively, git grep) and read-file, so that's the path. Reading the commit details, the patch includes `indio_dev->trig = iio_trigger_get(data->trig);` and code which uses `client->irq`. Does `i2c-stub` handle interrupts? I doubt it. No, i2c-stub has no `irq` support. Finally, we read the fuzzing guidelines very, very carefully. The "structurally unreachable hardware" section is the nail in the coffin: "Vendor-specific... requiring physical... cards not emulated in standard QEMU". This precisely describes the VL53L0X situation. It's an I2C sensor. No QEMU emulation. No easy workaround with adapters. Therefore, it's structurally unreachable for effective fuzzing. |
| 8/2 | 2026/09/18 08:04 | tool | grepper |
0mArgs:{
"Expression": "config VL53L0X_I2C",
"PathPrefix": "drivers/iio/proximity"
}Results: {
"Output": "drivers/iio/proximity/Kconfig=225=config VCNL3020\n--\ndrivers/iio/proximity/Kconfig-235-\ndrivers/iio/proximity/Kconfig:236:config VL53L0X_I2C\ndrivers/iio/proximity/Kconfig-237-\ttristate \"STMicroelectronics VL53L0X ToF ranger sensor (I2C)\"\n"
} |
| 9/2 | 2026/09/18 08:04 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 9206 output: 37 thoughts: 22 Thoughts: Here's my attempt at summarizing the thought process, tailored for an expert audience: **Diving into the Proximity Sensor Configuration** Alright, let's get down to brass tacks. I'm thinking we need to delve into the `drivers/iio/proximity/Kconfig` file, specifically around line 236. The Kconfig, being the kernel's configuration system, is where we define the options for enabling or disabling this proximity sensor driver and its associated features. Line 236… that's likely where we'll find some of the core dependencies or conditional statements that govern how these proximity sensors are integrated into a system. I bet there's some interesting stuff there—perhaps specific sensor models, hardware revisions, or even power-saving configurations that are conditional on some other system features. This should be where the critical decisions about which sensors are compiled in, depending on the system config, happen. I'm keen to see the structure there; let's get into it. |
| 10/2 | 2026/09/18 08:04 | tool | read-file |
0mArgs:{
"File": "drivers/iio/proximity/Kconfig",
"FirstLine": 235,
"LineCount": 25
}Results: {
"Contents": " 235:\t\n 236:\tconfig VL53L0X_I2C\n 237:\t\ttristate \"STMicroelectronics VL53L0X ToF ranger sensor (I2C)\"\n 238:\t\tdepends on I2C\n 239:\t\thelp\n 240:\t\t Say Y here to build a driver for STMicroelectronics VL53L0X\n 241:\t\t ToF ranger sensors with i2c interface.\n 242:\t\t This driver can be used to measure the distance of objects.\n 243:\t\n 244:\t\t To compile this driver as a module, choose M here: the\n 245:\t\t module will be called vl53l0x-i2c.\n 246:\t\n 247:\tconfig VL53L1X_I2C\n 248:\t\ttristate \"STMicroelectronics VL53L1X ToF ranger sensor (I2C)\"\n 249:\t\tdepends on I2C\n 250:\t\tselect IIO_BUFFER\n 251:\t\tselect IIO_TRIGGERED_BUFFER\n 252:\t\tselect REGMAP_I2C\n 253:\t\tselect RESET_CONTROLLER\n 254:\t\thelp\n 255:\t\t Say Y here to build a driver for STMicroelectronics VL53L1X\n 256:\t\t ToF ranger sensors with i2c interface.\n 257:\t\t This driver can be used to measure the distance of objects.\n 258:\t\n 259:\t\t To compile this driver as a module, choose M here: the\n"
} |
| 11/2 | 2026/09/18 08:04 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 9892 output: 38 thoughts: 637 Thoughts: **Analyzing a Potential Reference Leak in the VL53L0X IIO Driver** Okay, let's break this down. I'm looking at the `VL53L0X_I2C` driver, which is an IIO driver for the VL53L0X ToF sensor over I2C. My initial thought is: why was this patch introduced? What problem were they trying to solve? Looking at the original `vl53l0x_probe` function before the patch, a potential reference leak immediately catches my eye. Specifically, I see this sequence: ```c ret = devm_iio_trigger_register(&client->dev, data->trig); if (ret) return ret; indio_dev->trig = iio_trigger_get(data->trig); ret = vl53l0x_configure_irq(client, indio_dev); if (ret) return ret; ret = devm_iio_triggered_buffer_setup(&client->dev, indio_dev, NULL, &vl53l0x_trigger_handler, &iio_triggered_buffer_setup_ops); if (ret) return ret; } return devm_iio_device_register(&client->dev, indio_dev); ``` The issue here is, if either `vl53l0x_configure_irq` or `devm_iio_triggered_buffer_setup` fails, we have a problem. The `iio_trigger_get(data->trig)` call increments the reference count for `indio_dev->trig`, but we don't have a corresponding `iio_trigger_put()` in the error path. If the device registration itself fails, or if `vl53l0x_configure_irq` or `devm_iio_triggered_buffer_setup` errors, the reference isn't decremented, leading to a potential leak. Now I need to clarify something about how IIO works: Does `devm_iio_triggered_buffer_setup` use or check `indio_dev->trig`? Or is `iio_trigger_get` setting up a default trigger? The documentation should clarify this. Wait! In IIO, assigning `indio_dev->trig = iio_trigger_get(data->trig);` sets the default trigger for the device. If `devm_iio_device_register` fails, or if the probe itself errors, who's responsible for putting the trigger? I remember that `iio_device_release` calls `iio_trigger_put(indio_dev->trig)`. But if `vl53l0x_configure_irq` or `devm_iio_triggered_buffer_setup` fails *before* device registration, we still have a problem. Why was `indio_dev->trig = iio_trigger_get(data->trig);` moved? Oh, because `devm_iio_triggered_buffer_setup` sets up a triggered buffer. To understand the full context, I need more information: the commit history for this patch and potentially look at the history for `vl53l0x_configure_irq` or `iio_triggered_buffer_setup_ops`. I'll use `git blame` or `git grep` to find similar commits to better understand what this patch was trying to resolve. |
| 12/2 | 2026/09/18 08:05 | tool | grepper |
0mArgs:{
"Expression": "indio_dev-\u003etrig = iio_trigger_get",
"PathPrefix": "drivers/iio"
}Results: {
"Output": "drivers/iio/accel/adxl355_core.c=757=static int adxl355_probe_trigger(struct iio_dev *indio_dev, int irq)\n--\ndrivers/iio/accel/adxl355_core.c-782-\ndrivers/iio/accel/adxl355_core.c:783:\tindio_dev-\u003etrig = iio_trigger_get(data-\u003edready_trig);\ndrivers/iio/accel/adxl355_core.c-784-\n--\ndrivers/iio/accel/adxl372.c=1234=static int adxl372_buffer_setup(struct iio_dev *indio_dev)\n--\ndrivers/iio/accel/adxl372.c-1274-\ndrivers/iio/accel/adxl372.c:1275:\tindio_dev-\u003etrig = iio_trigger_get(st-\u003edready_trig);\ndrivers/iio/accel/adxl372.c-1276-\n--\ndrivers/iio/accel/bma180.c=918=static int bma180_probe(struct i2c_client *client)\n--\ndrivers/iio/accel/bma180.c-1003-\ndrivers/iio/accel/bma180.c:1004:\t\tindio_dev-\u003etrig = iio_trigger_get(data-\u003etrig);\ndrivers/iio/accel/bma180.c-1005-\t}\n--\ndrivers/iio/accel/bma220_core.c=501=int bma220_common_probe(struct device *dev, struct regmap *regmap, int irq)\n--\ndrivers/iio/accel/bma220_core.c-542-\t\t\t\t\t \"iio trigger register fail\\n\");\ndrivers/iio/accel/bma220_core.c:543:\t\tindio_dev-\u003etrig = iio_trigger_get(data-\u003etrig);\ndrivers/iio/accel/bma220_core.c-544-\t\tret = devm_request_threaded_irq(dev, irq, NULL,\n--\ndrivers/iio/accel/bma400_core.c=1740=int bma400_probe(struct device *dev, struct regmap *regmap, int irq,\n--\ndrivers/iio/accel/bma400_core.c-1785-\ndrivers/iio/accel/bma400_core.c:1786:\t\tindio_dev-\u003etrig = iio_trigger_get(data-\u003etrig);\ndrivers/iio/accel/bma400_core.c-1787-\t\tret = devm_request_threaded_irq(dev, irq, NULL,\n--\ndrivers/iio/accel/kxcjk-1013.c=1383=static int kxcjk1013_probe(struct i2c_client *client)\n--\ndrivers/iio/accel/kxcjk-1013.c-1490-\ndrivers/iio/accel/kxcjk-1013.c:1491:\t\tindio_dev-\u003etrig = iio_trigger_get(data-\u003edready_trig);\ndrivers/iio/accel/kxcjk-1013.c-1492-\n--\ndrivers/iio/accel/mma8452.c=1476=static int mma8452_trigger_setup(struct iio_dev *indio_dev)\n--\ndrivers/iio/accel/mma8452.c-1494-\ndrivers/iio/accel/mma8452.c:1495:\tindio_dev-\u003etrig = iio_trigger_get(trig);\ndrivers/iio/accel/mma8452.c-1496-\n--\ndrivers/iio/accel/mxc4005.c=428=static int mxc4005_probe(struct i2c_client *client)\n--\ndrivers/iio/accel/mxc4005.c-508-\ndrivers/iio/accel/mxc4005.c:509:\t\tindio_dev-\u003etrig = iio_trigger_get(data-\u003edready_trig);\ndrivers/iio/accel/mxc4005.c-510-\t}\n--\ndrivers/iio/adc/ad4062.c=730=static int ad4062_request_trigger(struct iio_dev *indio_dev)\n--\ndrivers/iio/adc/ad4062.c-748-\ndrivers/iio/adc/ad4062.c:749:\tindio_dev-\u003etrig = iio_trigger_get(st-\u003etrigger);\ndrivers/iio/adc/ad4062.c-750-\n--\ndrivers/iio/adc/ad4170-4.c=2831=static int ad4170_trigger_setup(struct iio_dev *indio_dev)\n--\ndrivers/iio/adc/ad4170-4.c-2849-\ndrivers/iio/adc/ad4170-4.c:2850:\tindio_dev-\u003etrig = iio_trigger_get(st-\u003etrig);\ndrivers/iio/adc/ad4170-4.c-2851-\n--\ndrivers/iio/adc/ad7606.c=1490=int ad7606_probe(struct device *dev, int irq, void __iomem *base_address,\n--\ndrivers/iio/adc/ad7606.c-1640-\ndrivers/iio/adc/ad7606.c:1641:\t\tindio_dev-\u003etrig = iio_trigger_get(st-\u003etrig);\ndrivers/iio/adc/ad7606.c-1642-\n--\ndrivers/iio/adc/ad7768-1.c=1491=static int ad7768_triggered_buffer_alloc(struct iio_dev *indio_dev)\n--\ndrivers/iio/adc/ad7768-1.c-1507-\ndrivers/iio/adc/ad7768-1.c:1508:\tindio_dev-\u003etrig = iio_trigger_get(st-\u003etrig);\ndrivers/iio/adc/ad7768-1.c-1509-\n--\ndrivers/iio/adc/ad7779.c=824=static int ad7779_setup_without_backend(struct ad7779_state *st, struct iio_dev *indio_dev)\n--\ndrivers/iio/adc/ad7779.c-852-\ndrivers/iio/adc/ad7779.c:853:\tindio_dev-\u003etrig = iio_trigger_get(st-\u003etrig);\ndrivers/iio/adc/ad7779.c-854-\n--\ndrivers/iio/adc/ad_sigma_delta.c=742=static int devm_ad_sd_probe_trigger(struct device *dev, struct iio_dev *indio_dev)\n--\ndrivers/iio/adc/ad_sigma_delta.c-791-\t\t/* select default trigger */\ndrivers/iio/adc/ad_sigma_delta.c:792:\t\tindio_dev-\u003etrig = iio_trigger_get(sigma_delta-\u003etrig);\ndrivers/iio/adc/ad_sigma_delta.c-793-\t}\n--\ndrivers/iio/adc/ti-ads131e08.c=794=static int ads131e08_probe(struct spi_device *spi)\n--\ndrivers/iio/adc/ti-ads131e08.c-853-\ndrivers/iio/adc/ti-ads131e08.c:854:\tindio_dev-\u003etrig = iio_trigger_get(st-\u003etrig);\ndrivers/iio/adc/ti-ads131e08.c-855-\n--\ndrivers/iio/adc/ti-tsc2046.c=740=static int tsc2046_adc_probe(struct spi_device *spi)\n--\ndrivers/iio/adc/ti-tsc2046.c-825-\t/* set default trigger */\ndrivers/iio/adc/ti-tsc2046.c:826:\tindio_dev-\u003etrig = iio_trigger_get(priv-\u003etrig);\ndrivers/iio/adc/ti-tsc2046.c-827-\n--\ndrivers/iio/addac/ad74115.c=1783=static int ad74115_setup_trigger(struct iio_dev *indio_dev)\n--\ndrivers/iio/addac/ad74115.c-1815-\ndrivers/iio/addac/ad74115.c:1816:\tindio_dev-\u003etrig = iio_trigger_get(st-\u003etrig);\ndrivers/iio/addac/ad74115.c-1817-\n--\ndrivers/iio/addac/ad74413r.c=1345=static int ad74413r_probe(struct spi_device *spi)\n--\ndrivers/iio/addac/ad74413r.c-1399-\tindio_dev-\u003einfo = \u0026ad74413r_info;\ndrivers/iio/addac/ad74413r.c:1400:\tindio_dev-\u003etrig = iio_trigger_get(st-\u003etrig);\ndrivers/iio/addac/ad74413r.c-1401-\n--\ndrivers/iio/chemical/ccs811.c=405=static int ccs811_probe(struct i2c_client *client)\n--\ndrivers/iio/chemical/ccs811.c-506-\ndrivers/iio/chemical/ccs811.c:507:\t\tindio_dev-\u003etrig = iio_trigger_get(data-\u003edrdy_trig);\ndrivers/iio/chemical/ccs811.c-508-\t}\n--\ndrivers/iio/chemical/ens160_core.c=299=static int ens160_setup_trigger(struct iio_dev *indio_dev, int irq)\n--\ndrivers/iio/chemical/ens160_core.c-316-\ndrivers/iio/chemical/ens160_core.c:317:\tindio_dev-\u003etrig = iio_trigger_get(trig);\ndrivers/iio/chemical/ens160_core.c-318-\n--\ndrivers/iio/chemical/scd30_core.c=628=static int scd30_setup_trigger(struct iio_dev *indio_dev)\n--\ndrivers/iio/chemical/scd30_core.c-646-\ndrivers/iio/chemical/scd30_core.c:647:\tindio_dev-\u003etrig = iio_trigger_get(trig);\ndrivers/iio/chemical/scd30_core.c-648-\n--\ndrivers/iio/common/hid-sensors/hid-sensor-trigger.c=235=int hid_sensor_setup_trigger(struct iio_dev *indio_dev, const char *name,\n--\ndrivers/iio/common/hid-sensors/hid-sensor-trigger.c-281-\tattrb-\u003etrigger = trig;\ndrivers/iio/common/hid-sensors/hid-sensor-trigger.c:282:\tindio_dev-\u003etrig = iio_trigger_get(trig);\ndrivers/iio/common/hid-sensors/hid-sensor-trigger.c-283-\n--\ndrivers/iio/common/st_sensors/st_sensors_trigger.c=119=int st_sensors_allocate_trigger(struct iio_dev *indio_dev,\n--\ndrivers/iio/common/st_sensors/st_sensors_trigger.c-223-\t}\ndrivers/iio/common/st_sensors/st_sensors_trigger.c:224:\tindio_dev-\u003etrig = iio_trigger_get(sdata-\u003etrig);\ndrivers/iio/common/st_sensors/st_sensors_trigger.c-225-\n--\ndrivers/iio/gyro/adxrs290.c=579=static int adxrs290_probe_trigger(struct iio_dev *indio_dev)\n--\ndrivers/iio/gyro/adxrs290.c-610-\ndrivers/iio/gyro/adxrs290.c:611:\tindio_dev-\u003etrig = iio_trigger_get(st-\u003edready_trig);\ndrivers/iio/gyro/adxrs290.c-612-\n--\ndrivers/iio/gyro/itg3200_buffer.c=111=int itg3200_probe_trigger(struct iio_dev *indio_dev)\n--\ndrivers/iio/gyro/itg3200_buffer.c-134-\t/* select default trigger */\ndrivers/iio/gyro/itg3200_buffer.c:135:\tindio_dev-\u003etrig = iio_trigger_get(st-\u003etrig);\ndrivers/iio/gyro/itg3200_buffer.c-136-\n--\ndrivers/iio/gyro/mpu3050-core.c=1050=static int mpu3050_trigger_probe(struct iio_dev *indio_dev, int irq)\n--\ndrivers/iio/gyro/mpu3050-core.c-1133-\ndrivers/iio/gyro/mpu3050-core.c:1134:\tindio_dev-\u003etrig = iio_trigger_get(mpu3050-\u003etrig);\ndrivers/iio/gyro/mpu3050-core.c-1135-\n--\ndrivers/iio/imu/bmi160/bmi160_core.c=777=int bmi160_probe_trigger(struct iio_dev *indio_dev, int irq, u32 irq_type)\n--\ndrivers/iio/imu/bmi160/bmi160_core.c-802-\ndrivers/iio/imu/bmi160/bmi160_core.c:803:\tindio_dev-\u003etrig = iio_trigger_get(data-\u003etrig);\ndrivers/iio/imu/bmi160/bmi160_core.c-804-\n--\ndrivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c=301=int inv_mpu6050_probe_trigger(struct iio_dev *indio_dev, int irq_type)\n--\ndrivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c-328-\ndrivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c:329:\tindio_dev-\u003etrig = iio_trigger_get(st-\u003etrig);\ndrivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c-330-\n--\ndrivers/iio/imu/smi330/smi330_core.c=842=int smi330_core_probe(struct device *dev, struct regmap *regmap)\n--\ndrivers/iio/imu/smi330/smi330_core.c-890-\t\t/* Set default operation mode to data ready. */\ndrivers/iio/imu/smi330/smi330_core.c:891:\t\tindio_dev-\u003etrig = iio_trigger_get(data-\u003etrig);\ndrivers/iio/imu/smi330/smi330_core.c-892-\t}\n--\ndrivers/iio/industrialio-trigger.c=114=int iio_trigger_set_immutable(struct iio_dev *indio_dev, struct iio_trigger *trig)\n--\ndrivers/iio/industrialio-trigger.c-124-\ndrivers/iio/industrialio-trigger.c:125:\tindio_dev-\u003etrig = iio_trigger_get(trig);\ndrivers/iio/industrialio-trigger.c-126-\tiio_dev_opaque-\u003etrig_readonly = true;\n--\ndrivers/iio/light/acpi-als.c=179=static int acpi_als_probe(struct platform_device *pdev)\n--\ndrivers/iio/light/acpi-als.c-212-\t */\ndrivers/iio/light/acpi-als.c:213:\tindio_dev-\u003etrig = iio_trigger_get(als-\u003etrig);\ndrivers/iio/light/acpi-als.c-214-\n--\ndrivers/iio/light/si1145.c=1234=static int si1145_probe_trigger(struct iio_dev *indio_dev)\n--\ndrivers/iio/light/si1145.c-1263-\tdata-\u003etrig = trig;\ndrivers/iio/light/si1145.c:1264:\tindio_dev-\u003etrig = iio_trigger_get(data-\u003etrig);\ndrivers/iio/light/si1145.c-1265-\n--\ndrivers/iio/light/vl6180.c=694=static int vl6180_probe(struct i2c_client *client)\n--\ndrivers/iio/light/vl6180.c-739-\ndrivers/iio/light/vl6180.c:740:\t\tindio_dev-\u003etrig = iio_trigger_get(data-\u003etrig);\ndrivers/iio/light/vl6180.c-741-\t}\n--\ndrivers/iio/pressure/bmp280-core.c=1290=static int __bmp280_trigger_probe(struct iio_dev *indio_dev,\n--\ndrivers/iio/pressure/bmp280-core.c-1341-\ndrivers/iio/pressure/bmp280-core.c:1342:\tindio_dev-\u003etrig = iio_trigger_get(data-\u003etrig);\ndrivers/iio/pressure/bmp280-core.c-1343-\n--\ndrivers/iio/pressure/mpl3115.c=623=static int mpl3115_trigger_probe(struct mpl3115_data *data,\n--\ndrivers/iio/pressure/mpl3115.c-688-\ndrivers/iio/pressure/mpl3115.c:689:\tindio_dev-\u003etrig = iio_trigger_get(data-\u003edrdy_trig);\ndrivers/iio/pressure/mpl3115.c-690-\n--\ndrivers/iio/proximity/vl53l0x-i2c.c=310=static int vl53l0x_probe(struct i2c_client *client)\n--\ndrivers/iio/proximity/vl53l0x-i2c.c-388-\ndrivers/iio/proximity/vl53l0x-i2c.c:389:\t\tindio_dev-\u003etrig = iio_trigger_get(data-\u003etrig);\ndrivers/iio/proximity/vl53l0x-i2c.c-390-\t}\n--\ndrivers/iio/proximity/vl53l1x-i2c.c=625=static int vl53l1x_probe(struct i2c_client *client)\n--\ndrivers/iio/proximity/vl53l1x-i2c.c-715-\ndrivers/iio/proximity/vl53l1x-i2c.c:716:\t\tindio_dev-\u003etrig = iio_trigger_get(trig);\ndrivers/iio/proximity/vl53l1x-i2c.c-717-\n--\ndrivers/iio/temperature/tmp006.c=297=static int tmp006_probe(struct i2c_client *client)\n--\ndrivers/iio/temperature/tmp006.c-356-\ndrivers/iio/temperature/tmp006.c:357:\t\tindio_dev-\u003etrig = iio_trigger_get(data-\u003edrdy_trig);\ndrivers/iio/temperature/tmp006.c-358-\n"
} |
| 13/2 | 2026/09/18 08:05 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 16787 output: 47 thoughts: 53 Thoughts: Here's my take on the thought process, as if it were my own: **Diving into the VL53L1X Driver** Okay, time to get my hands dirty with this VL53L1X I2C driver. I need to understand what's going on at a specific point in the code, so let's jump right to line 715 in `vl53l1x-i2c.c`. I'm going to navigate to `drivers/iio/proximity/vl53l1x-i2c.c` now and see what the context is around that line. Hopefully, this pinpoint focus gives me enough information to understand the issue. |
| 14/2 | 2026/09/18 08:05 | tool | read-file |
0mArgs:{
"File": "drivers/iio/proximity/vl53l1x-i2c.c",
"FirstLine": 700,
"LineCount": 25
}Results: {
"Contents": " 700:\t\tif (client-\u003eirq) {\n 701:\t\t\tstruct iio_trigger *trig;\n 702:\t\n 703:\t\t\tinit_completion(\u0026data-\u003ecompletion);\n 704:\t\n 705:\t\t\ttrig = devm_iio_trigger_alloc(dev, \"%s-dev%d\", indio_dev-\u003ename,\n 706:\t\t\t\t\t\t iio_device_id(indio_dev));\n 707:\t\t\tif (!trig)\n 708:\t\t\t\treturn -ENOMEM;\n 709:\t\n 710:\t\t\ttrig-\u003eops = \u0026vl53l1x_trigger_ops;\n 711:\t\t\tiio_trigger_set_drvdata(trig, indio_dev);\n 712:\t\t\tret = devm_iio_trigger_register(dev, trig);\n 713:\t\t\tif (ret)\n 714:\t\t\t\treturn ret;\n 715:\t\n 716:\t\t\tindio_dev-\u003etrig = iio_trigger_get(trig);\n 717:\t\n 718:\t\t\tret = vl53l1x_configure_irq(dev, client-\u003eirq, indio_dev);\n 719:\t\t\tif (ret)\n 720:\t\t\t\treturn ret;\n 721:\t\n 722:\t\t\tret = devm_iio_triggered_buffer_setup(dev, indio_dev, NULL,\n 723:\t\t\t\t\t\t\t \u0026vl53l1x_trigger_handler,\n 724:\t\t\t\t\t\t\t NULL);\n"
} |
| 15/2 | 2026/09/18 08:05 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 17452 output: 30 thoughts: 401 Thoughts: **Analyzing the `vl53l0x_probe` Function** Okay, so I'm looking at this `vl53l0x_probe` function, specifically this section of code: I've noticed this change: `indio_dev->trig = iio_trigger_get(data->trig);` has been moved *after* `devm_iio_triggered_buffer_setup`. My initial thought is: why was this order changed? It seems like an important detail to understand the implications. Now, I need to check something. If either `vl53l0x_configure_irq` or `devm_iio_triggered_buffer_setup` returns an error, the `probe` function immediately returns that error. But, the crucial point is that if the `probe` function returns an error *before* the call to `devm_iio_device_register`, then `indio_dev` is cleaned up and freed. However, a question arises in my mind. The `devm_iio_device_alloc` function handles the cleanup in case the probe fails. But, what happens if `indio_dev->trig` *has* been set before the error return? Does the `devres` mechanism handle freeing the trigger properly? Is `iio_trigger_get` balanced by a corresponding free somewhere? I have a feeling this could lead to a resource leak, or even a use-after-free scenario. This is something I really need to double check to make sure it is handled correctly. Therefore, I need to go look into `iio_device_alloc` and `iio_device_free` to confirm if the trigger is handled correctly during device deallocation. |
| 16/2 | 2026/09/18 08:05 | tool | grepper |
0mArgs:{
"Expression": "iio_device_alloc",
"PathPrefix": "drivers/iio"
}Results: {
"Output": "\nFull output is too long, showing 500 out of 3053 lines.\nUse more precise expression if possible.\n\ndrivers/iio/accel/adis16201.c=257=static int adis16201_probe(struct spi_device *spi)\n--\ndrivers/iio/accel/adis16201.c-262-\ndrivers/iio/accel/adis16201.c:263:\tindio_dev = devm_iio_device_alloc(\u0026spi-\u003edev, sizeof(*st));\ndrivers/iio/accel/adis16201.c-264-\tif (!indio_dev)\n--\ndrivers/iio/accel/adis16209.c=268=static int adis16209_probe(struct spi_device *spi)\n--\ndrivers/iio/accel/adis16209.c-273-\ndrivers/iio/accel/adis16209.c:274:\tindio_dev = devm_iio_device_alloc(\u0026spi-\u003edev, sizeof(*st));\ndrivers/iio/accel/adis16209.c-275-\tif (!indio_dev)\n--\ndrivers/iio/accel/adxl313_core.c=1224=int adxl313_core_probe(struct device *dev,\n--\ndrivers/iio/accel/adxl313_core.c-1234-\ndrivers/iio/accel/adxl313_core.c:1235:\tindio_dev = devm_iio_device_alloc(dev, sizeof(*data));\ndrivers/iio/accel/adxl313_core.c-1236-\tif (!indio_dev)\n--\ndrivers/iio/accel/adxl345_core.c=1884=int adxl345_core_probe(struct device *dev, struct regmap *regmap,\n--\ndrivers/iio/accel/adxl345_core.c-1899-\ndrivers/iio/accel/adxl345_core.c:1900:\tindio_dev = devm_iio_device_alloc(dev, sizeof(*st));\ndrivers/iio/accel/adxl345_core.c-1901-\tif (!indio_dev)\n--\ndrivers/iio/accel/adxl355_core.c=788=int adxl355_core_probe(struct device *dev, struct regmap *regmap,\n--\ndrivers/iio/accel/adxl355_core.c-795-\ndrivers/iio/accel/adxl355_core.c:796:\tindio_dev = devm_iio_device_alloc(dev, sizeof(*data));\ndrivers/iio/accel/adxl355_core.c-797-\tif (!indio_dev)\n--\ndrivers/iio/accel/adxl367.c=1430=int adxl367_probe(struct device *dev, const struct adxl367_ops *ops,\n--\ndrivers/iio/accel/adxl367.c-1437-\ndrivers/iio/accel/adxl367.c:1438:\tindio_dev = devm_iio_device_alloc(dev, sizeof(*st));\ndrivers/iio/accel/adxl367.c-1439-\tif (!indio_dev)\n--\ndrivers/iio/accel/adxl372.c=1283=int adxl372_probe(struct device *dev, struct regmap *regmap,\n--\ndrivers/iio/accel/adxl372.c-1289-\ndrivers/iio/accel/adxl372.c:1290:\tindio_dev = devm_iio_device_alloc(dev, sizeof(*st));\ndrivers/iio/accel/adxl372.c-1291-\tif (!indio_dev)\n--\ndrivers/iio/accel/adxl380.c=1952=int adxl380_probe(struct device *dev, struct regmap *regmap,\n--\ndrivers/iio/accel/adxl380.c-1958-\ndrivers/iio/accel/adxl380.c:1959:\tindio_dev = devm_iio_device_alloc(dev, sizeof(*st));\ndrivers/iio/accel/adxl380.c-1960-\tif (!indio_dev)\n--\ndrivers/iio/accel/bma180.c=918=static int bma180_probe(struct i2c_client *client)\n--\ndrivers/iio/accel/bma180.c-925-\ndrivers/iio/accel/bma180.c:926:\tindio_dev = devm_iio_device_alloc(dev, sizeof(*data));\ndrivers/iio/accel/bma180.c-927-\tif (!indio_dev)\n--\ndrivers/iio/accel/bma220_core.c=501=int bma220_common_probe(struct device *dev, struct regmap *regmap, int irq)\n--\ndrivers/iio/accel/bma220_core.c-506-\ndrivers/iio/accel/bma220_core.c:507:\tindio_dev = devm_iio_device_alloc(dev, sizeof(*data));\ndrivers/iio/accel/bma220_core.c-508-\tif (!indio_dev)\n--\ndrivers/iio/accel/bma400_core.c=1740=int bma400_probe(struct device *dev, struct regmap *regmap, int irq,\n--\ndrivers/iio/accel/bma400_core.c-1746-\ndrivers/iio/accel/bma400_core.c:1747:\tindio_dev = devm_iio_device_alloc(dev, sizeof(*data));\ndrivers/iio/accel/bma400_core.c-1748-\tif (!indio_dev)\n--\ndrivers/iio/accel/bmc150-accel-core.c=1621=int bmc150_accel_core_probe(struct device *dev, struct regmap *regmap, int irq,\n--\ndrivers/iio/accel/bmc150-accel-core.c-1629-\ndrivers/iio/accel/bmc150-accel-core.c:1630:\tindio_dev = devm_iio_device_alloc(dev, sizeof(*data));\ndrivers/iio/accel/bmc150-accel-core.c-1631-\tif (!indio_dev)\n--\ndrivers/iio/accel/bmi088-accel-core.c=546=int bmi088_accel_core_probe(struct device *dev, struct regmap *regmap,\n--\ndrivers/iio/accel/bmi088-accel-core.c-552-\ndrivers/iio/accel/bmi088-accel-core.c:553:\tindio_dev = devm_iio_device_alloc(dev, sizeof(*data));\ndrivers/iio/accel/bmi088-accel-core.c-554-\tif (!indio_dev)\n--\ndrivers/iio/accel/cros_ec_accel_legacy.c=206=static int cros_ec_accel_legacy_probe(struct platform_device *pdev)\n--\ndrivers/iio/accel/cros_ec_accel_legacy.c-212-\ndrivers/iio/accel/cros_ec_accel_legacy.c:213:\tindio_dev = devm_iio_device_alloc(\u0026pdev-\u003edev, sizeof(*state));\ndrivers/iio/accel/cros_ec_accel_legacy.c-214-\tif (!indio_dev)\n--\ndrivers/iio/accel/da280.c=100=static int da280_probe(struct i2c_client *client)\n--\ndrivers/iio/accel/da280.c-116-\ndrivers/iio/accel/da280.c:117:\tindio_dev = devm_iio_device_alloc(\u0026client-\u003edev, sizeof(*data));\ndrivers/iio/accel/da280.c-118-\tif (!indio_dev)\n--\ndrivers/iio/accel/da311.c=220=static int da311_probe(struct i2c_client *client)\n--\ndrivers/iio/accel/da311.c-229-\ndrivers/iio/accel/da311.c:230:\tindio_dev = devm_iio_device_alloc(\u0026client-\u003edev, sizeof(*data));\ndrivers/iio/accel/da311.c-231-\tif (!indio_dev)\n--\ndrivers/iio/accel/dmard06.c=128=static int dmard06_probe(struct i2c_client *client)\n--\ndrivers/iio/accel/dmard06.c-138-\ndrivers/iio/accel/dmard06.c:139:\tindio_dev = devm_iio_device_alloc(\u0026client-\u003edev, sizeof(*dmard06));\ndrivers/iio/accel/dmard06.c-140-\tif (!indio_dev)\n--\ndrivers/iio/accel/dmard09.c=91=static int dmard09_probe(struct i2c_client *client)\n--\ndrivers/iio/accel/dmard09.c-96-\ndrivers/iio/accel/dmard09.c:97:\tindio_dev = devm_iio_device_alloc(\u0026client-\u003edev, sizeof(*data));\ndrivers/iio/accel/dmard09.c-98-\tif (!indio_dev)\n--\ndrivers/iio/accel/dmard10.c=178=static int dmard10_probe(struct i2c_client *client)\n--\ndrivers/iio/accel/dmard10.c-192-\ndrivers/iio/accel/dmard10.c:193:\tindio_dev = devm_iio_device_alloc(\u0026client-\u003edev, sizeof(*data));\ndrivers/iio/accel/dmard10.c-194-\tif (!indio_dev)\n--\ndrivers/iio/accel/fxls8962af-core.c=1168=int fxls8962af_core_probe(struct device *dev, struct regmap *regmap, int irq)\n--\ndrivers/iio/accel/fxls8962af-core.c-1174-\ndrivers/iio/accel/fxls8962af-core.c:1175:\tindio_dev = devm_iio_device_alloc(dev, sizeof(*data));\ndrivers/iio/accel/fxls8962af-core.c-1176-\tif (!indio_dev)\n--\ndrivers/iio/accel/hid-sensor-accel-3d.c=329=static int hid_accel_3d_probe(struct platform_device *pdev)\n--\ndrivers/iio/accel/hid-sensor-accel-3d.c-338-\ndrivers/iio/accel/hid-sensor-accel-3d.c:339:\tindio_dev = devm_iio_device_alloc(\u0026pdev-\u003edev,\ndrivers/iio/accel/hid-sensor-accel-3d.c-340-\t\t\t\t\t sizeof(struct accel_3d_state));\n--\ndrivers/iio/accel/kionix-kx022a.c=1316=int kx022a_probe_internal(struct device *dev, const struct kx022a_chip_info *chip_info)\n--\ndrivers/iio/accel/kionix-kx022a.c-1337-\ndrivers/iio/accel/kionix-kx022a.c:1338:\tidev = devm_iio_device_alloc(dev, sizeof(*data));\ndrivers/iio/accel/kionix-kx022a.c-1339-\tif (!idev)\n--\ndrivers/iio/accel/kxcjk-1013.c=1383=static int kxcjk1013_probe(struct i2c_client *client)\n--\ndrivers/iio/accel/kxcjk-1013.c-1393-\ndrivers/iio/accel/kxcjk-1013.c:1394:\tindio_dev = devm_iio_device_alloc(\u0026client-\u003edev, sizeof(*data));\ndrivers/iio/accel/kxcjk-1013.c-1395-\tif (!indio_dev)\n--\ndrivers/iio/accel/kxsd9.c=393=int kxsd9_common_probe(struct device *dev,\n--\ndrivers/iio/accel/kxsd9.c-400-\ndrivers/iio/accel/kxsd9.c:401:\tindio_dev = devm_iio_device_alloc(dev, sizeof(*st));\ndrivers/iio/accel/kxsd9.c-402-\tif (!indio_dev)\n--\ndrivers/iio/accel/mc3230.c=143=static int mc3230_probe(struct i2c_client *client)\n--\ndrivers/iio/accel/mc3230.c-170-\ndrivers/iio/accel/mc3230.c:171:\tindio_dev = devm_iio_device_alloc(\u0026client-\u003edev, sizeof(*data));\ndrivers/iio/accel/mc3230.c-172-\tif (!indio_dev)\n--\ndrivers/iio/accel/mma7455_core.c=245=int mma7455_core_probe(struct device *dev, struct regmap *regmap,\n--\ndrivers/iio/accel/mma7455_core.c-263-\ndrivers/iio/accel/mma7455_core.c:264:\tindio_dev = devm_iio_device_alloc(dev, sizeof(*mma7455));\ndrivers/iio/accel/mma7455_core.c-265-\tif (!indio_dev)\n--\ndrivers/iio/accel/mma7660.c=188=static int mma7660_probe(struct i2c_client *client)\n--\ndrivers/iio/accel/mma7660.c-193-\ndrivers/iio/accel/mma7660.c:194:\tindio_dev = devm_iio_device_alloc(\u0026client-\u003edev, sizeof(*data));\ndrivers/iio/accel/mma7660.c-195-\tif (!indio_dev)\n--\ndrivers/iio/accel/mma8452.c=1545=static int mma8452_probe(struct i2c_client *client)\n--\ndrivers/iio/accel/mma8452.c-1550-\ndrivers/iio/accel/mma8452.c:1551:\tindio_dev = devm_iio_device_alloc(\u0026client-\u003edev, sizeof(*data));\ndrivers/iio/accel/mma8452.c-1552-\tif (!indio_dev)\n--\ndrivers/iio/accel/mma9551.c=436=static int mma9551_probe(struct i2c_client *client)\n--\ndrivers/iio/accel/mma9551.c-443-\ndrivers/iio/accel/mma9551.c:444:\tindio_dev = devm_iio_device_alloc(\u0026client-\u003edev, sizeof(*data));\ndrivers/iio/accel/mma9551.c-445-\tif (!indio_dev)\n--\ndrivers/iio/accel/mma9553.c=1061=static int mma9553_probe(struct i2c_client *client)\n--\ndrivers/iio/accel/mma9553.c-1068-\ndrivers/iio/accel/mma9553.c:1069:\tindio_dev = devm_iio_device_alloc(\u0026client-\u003edev, sizeof(*data));\ndrivers/iio/accel/mma9553.c-1070-\tif (!indio_dev)\n--\ndrivers/iio/accel/msa311.c=1141=static int msa311_probe(struct i2c_client *i2c)\n--\ndrivers/iio/accel/msa311.c-1147-\ndrivers/iio/accel/msa311.c:1148:\tindio_dev = devm_iio_device_alloc(dev, sizeof(*msa311));\ndrivers/iio/accel/msa311.c-1149-\tif (!indio_dev)\n--\ndrivers/iio/accel/mxc4005.c=428=static int mxc4005_probe(struct i2c_client *client)\n--\ndrivers/iio/accel/mxc4005.c-434-\ndrivers/iio/accel/mxc4005.c:435:\tindio_dev = devm_iio_device_alloc(\u0026client-\u003edev, sizeof(*data));\ndrivers/iio/accel/mxc4005.c-436-\tif (!indio_dev)\n--\ndrivers/iio/accel/mxc6255.c=115=static int mxc6255_probe(struct i2c_client *client)\n--\ndrivers/iio/accel/mxc6255.c-122-\ndrivers/iio/accel/mxc6255.c:123:\tindio_dev = devm_iio_device_alloc(\u0026client-\u003edev, sizeof(*data));\ndrivers/iio/accel/mxc6255.c-124-\tif (!indio_dev)\n--\ndrivers/iio/accel/sca3000.c=1450=static int sca3000_probe(struct spi_device *spi)\n--\ndrivers/iio/accel/sca3000.c-1456-\ndrivers/iio/accel/sca3000.c:1457:\tindio_dev = devm_iio_device_alloc(dev, sizeof(*st));\ndrivers/iio/accel/sca3000.c-1458-\tif (!indio_dev)\n--\ndrivers/iio/accel/sca3300.c=611=static int sca3300_probe(struct spi_device *spi)\n--\ndrivers/iio/accel/sca3300.c-616-\ndrivers/iio/accel/sca3300.c:617:\tindio_dev = devm_iio_device_alloc(\u0026spi-\u003edev, sizeof(*sca_data));\ndrivers/iio/accel/sca3300.c-618-\tif (!indio_dev)\n--\ndrivers/iio/accel/ssp_accel_sensor.c=94=static int ssp_accel_probe(struct platform_device *pdev)\n--\ndrivers/iio/accel/ssp_accel_sensor.c-99-\ndrivers/iio/accel/ssp_accel_sensor.c:100:\tindio_dev = devm_iio_device_alloc(\u0026pdev-\u003edev, sizeof(*spd));\ndrivers/iio/accel/ssp_accel_sensor.c-101-\tif (!indio_dev)\n--\ndrivers/iio/accel/st_accel_i2c.c=171=static int st_accel_i2c_probe(struct i2c_client *client)\n--\ndrivers/iio/accel/st_accel_i2c.c-186-\ndrivers/iio/accel/st_accel_i2c.c:187:\tindio_dev = devm_iio_device_alloc(\u0026client-\u003edev, sizeof(*adata));\ndrivers/iio/accel/st_accel_i2c.c-188-\tif (!indio_dev)\n--\ndrivers/iio/accel/st_accel_spi.c=115=static int st_accel_spi_probe(struct spi_device *spi)\n--\ndrivers/iio/accel/st_accel_spi.c-130-\ndrivers/iio/accel/st_accel_spi.c:131:\tindio_dev = devm_iio_device_alloc(\u0026spi-\u003edev, sizeof(*adata));\ndrivers/iio/accel/st_accel_spi.c-132-\tif (!indio_dev)\n--\ndrivers/iio/accel/stk8312.c=500=static int stk8312_probe(struct i2c_client *client)\n--\ndrivers/iio/accel/stk8312.c-505-\ndrivers/iio/accel/stk8312.c:506:\tindio_dev = devm_iio_device_alloc(\u0026client-\u003edev, sizeof(*data));\ndrivers/iio/accel/stk8312.c-507-\tif (!indio_dev)\n--\ndrivers/iio/accel/stk8ba50.c=381=static int stk8ba50_probe(struct i2c_client *client)\n--\ndrivers/iio/accel/stk8ba50.c-386-\ndrivers/iio/accel/stk8ba50.c:387:\tindio_dev = devm_iio_device_alloc(\u0026client-\u003edev, sizeof(*data));\ndrivers/iio/accel/stk8ba50.c-388-\tif (!indio_dev)\n--\ndrivers/iio/adc/88pm886-gpadc.c=308=static int pm886_gpadc_probe(struct platform_device *pdev)\n--\ndrivers/iio/adc/88pm886-gpadc.c-317-\ndrivers/iio/adc/88pm886-gpadc.c:318:\tiio = devm_iio_device_alloc(dev, sizeof(*gpadc));\ndrivers/iio/adc/88pm886-gpadc.c-319-\tif (!iio)\n--\ndrivers/iio/adc/ab8500-gpadc.c=1074=static int ab8500_gpadc_probe(struct platform_device *pdev)\n--\ndrivers/iio/adc/ab8500-gpadc.c-1082-\ndrivers/iio/adc/ab8500-gpadc.c:1083:\tindio_dev = devm_iio_device_alloc(dev, sizeof(*gpadc));\ndrivers/iio/adc/ab8500-gpadc.c-1084-\tif (!indio_dev)\n--\ndrivers/iio/adc/ad4000.c=1004=static int ad4000_probe(struct spi_device *spi)\n--\ndrivers/iio/adc/ad4000.c-1011-\ndrivers/iio/adc/ad4000.c:1012:\tindio_dev = devm_iio_device_alloc(dev, sizeof(*st));\ndrivers/iio/adc/ad4000.c-1013-\tif (!indio_dev)\n--\ndrivers/iio/adc/ad4030.c=1426=static int ad4030_probe(struct spi_device *spi)\n--\ndrivers/iio/adc/ad4030.c-1432-\ndrivers/iio/adc/ad4030.c:1433:\tindio_dev = devm_iio_device_alloc(dev, sizeof(*st));\ndrivers/iio/adc/ad4030.c-1434-\tif (!indio_dev)\n--\ndrivers/iio/adc/ad4062.c=1484=static int ad4062_probe(struct i3c_device *i3cdev)\n--\ndrivers/iio/adc/ad4062.c-1493-\ndrivers/iio/adc/ad4062.c:1494:\tindio_dev = devm_iio_device_alloc(dev, sizeof(*st));\ndrivers/iio/adc/ad4062.c-1495-\tif (!indio_dev)\n--\ndrivers/iio/adc/ad4080.c=637=static int ad4080_probe(struct spi_device *spi)\n--\ndrivers/iio/adc/ad4080.c-644-\ndrivers/iio/adc/ad4080.c:645:\tindio_dev = devm_iio_device_alloc(\u0026spi-\u003edev, sizeof(*st));\ndrivers/iio/adc/ad4080.c-646-\tif (!indio_dev)\n--\ndrivers/iio/adc/ad4130.c=1984=static int ad4130_probe(struct spi_device *spi)\n--\ndrivers/iio/adc/ad4130.c-1990-\ndrivers/iio/adc/ad4130.c:1991:\tindio_dev = devm_iio_device_alloc(dev, sizeof(*st));\ndrivers/iio/adc/ad4130.c-1992-\tif (!indio_dev)\n--\ndrivers/iio/adc/ad4134.c=410=static int ad4134_probe(struct spi_device *spi)\n--\ndrivers/iio/adc/ad4134.c-417-\ndrivers/iio/adc/ad4134.c:418:\tindio_dev = devm_iio_device_alloc(dev, sizeof(*st));\ndrivers/iio/adc/ad4134.c-419-\tif (!indio_dev)\n--\ndrivers/iio/adc/ad4170-4.c=2925=static int ad4170_probe(struct spi_device *spi)\n--\ndrivers/iio/adc/ad4170-4.c-2932-\ndrivers/iio/adc/ad4170-4.c:2933:\tindio_dev = devm_iio_device_alloc(\u0026spi-\u003edev, sizeof(*st));\ndrivers/iio/adc/ad4170-4.c-2934-\tif (!indio_dev)\n--\ndrivers/iio/adc/ad4695.c=1790=static int ad4695_probe(struct spi_device *spi)\n--\ndrivers/iio/adc/ad4695.c-1798-\ndrivers/iio/adc/ad4695.c:1799:\tindio_dev = devm_iio_device_alloc(dev, sizeof(*st));\ndrivers/iio/adc/ad4695.c-1800-\tif (!indio_dev)\n--\ndrivers/iio/adc/ad4851.c=1168=static int ad4851_probe(struct spi_device *spi)\n--\ndrivers/iio/adc/ad4851.c-1174-\ndrivers/iio/adc/ad4851.c:1175:\tindio_dev = devm_iio_device_alloc(dev, sizeof(*st));\ndrivers/iio/adc/ad4851.c-1176-\tif (!indio_dev)\n--\ndrivers/iio/adc/ad7091r-base.c=297=int ad7091r_probe(struct device *dev, const struct ad7091r_init_info *init_info,\n--\ndrivers/iio/adc/ad7091r-base.c-303-\ndrivers/iio/adc/ad7091r-base.c:304:\tiio_dev = devm_iio_device_alloc(dev, sizeof(*st));\ndrivers/iio/adc/ad7091r-base.c-305-\tif (!iio_dev)\n--\ndrivers/iio/adc/ad7124.c=1594=static int ad7124_probe(struct spi_device *spi)\n--\ndrivers/iio/adc/ad7124.c-1605-\ndrivers/iio/adc/ad7124.c:1606:\tindio_dev = devm_iio_device_alloc(\u0026spi-\u003edev, sizeof(*st));\ndrivers/iio/adc/ad7124.c-1607-\tif (!indio_dev)\n--\ndrivers/iio/adc/ad7173.c=1997=static int ad7173_probe(struct spi_device *spi)\n--\ndrivers/iio/adc/ad7173.c-2003-\ndrivers/iio/adc/ad7173.c:2004:\tindio_dev = devm_iio_device_alloc(dev, sizeof(*st));\ndrivers/iio/adc/ad7173.c-2005-\tif (!indio_dev)\n--\ndrivers/iio/adc/ad7191.c=491=static int ad7191_probe(struct spi_device *spi)\n--\ndrivers/iio/adc/ad7191.c-497-\ndrivers/iio/adc/ad7191.c:498:\tindio_dev = devm_iio_device_alloc(dev, sizeof(*st));\ndrivers/iio/adc/ad7191.c-499-\tif (!indio_dev)\n--\ndrivers/iio/adc/ad7192.c=1337=static int ad7192_probe(struct spi_device *spi)\n--\ndrivers/iio/adc/ad7192.c-1346-\ndrivers/iio/adc/ad7192.c:1347:\tindio_dev = devm_iio_device_alloc(dev, sizeof(*st));\ndrivers/iio/adc/ad7192.c-1348-\tif (!indio_dev)\n--\ndrivers/iio/adc/ad7266.c=382=static int ad7266_probe(struct spi_device *spi)\n--\ndrivers/iio/adc/ad7266.c-389-\ndrivers/iio/adc/ad7266.c:390:\tindio_dev = devm_iio_device_alloc(\u0026spi-\u003edev, sizeof(*st));\ndrivers/iio/adc/ad7266.c-391-\tif (indio_dev == NULL)\n--\ndrivers/iio/adc/ad7280a.c=953=static int ad7280_probe(struct spi_device *spi)\n--\ndrivers/iio/adc/ad7280a.c-959-\ndrivers/iio/adc/ad7280a.c:960:\tindio_dev = devm_iio_device_alloc(dev, sizeof(*st));\ndrivers/iio/adc/ad7280a.c-961-\tif (!indio_dev)\n--\ndrivers/iio/adc/ad7291.c=468=static int ad7291_probe(struct i2c_client *client)\n--\ndrivers/iio/adc/ad7291.c-474-\ndrivers/iio/adc/ad7291.c:475:\tindio_dev = devm_iio_device_alloc(\u0026client-\u003edev, sizeof(*chip));\ndrivers/iio/adc/ad7291.c-476-\tif (!indio_dev)\n--\ndrivers/iio/adc/ad7292.c=254=static int ad7292_probe(struct spi_device *spi)\n--\ndrivers/iio/adc/ad7292.c-260-\ndrivers/iio/adc/ad7292.c:261:\tindio_dev = devm_iio_device_alloc(\u0026spi-\u003edev, sizeof(*st));\ndrivers/iio/adc/ad7292.c-262-\tif (!indio_dev)\n--\ndrivers/iio/adc/ad7298.c=284=static int ad7298_probe(struct spi_device *spi)\n--\ndrivers/iio/adc/ad7298.c-289-\ndrivers/iio/adc/ad7298.c:290:\tindio_dev = devm_iio_device_alloc(\u0026spi-\u003edev, sizeof(*st));\ndrivers/iio/adc/ad7298.c-291-\tif (indio_dev == NULL)\n--\ndrivers/iio/adc/ad7380.c=1884=static int ad7380_probe(struct spi_device *spi)\n--\ndrivers/iio/adc/ad7380.c-1891-\ndrivers/iio/adc/ad7380.c:1892:\tindio_dev = devm_iio_device_alloc(dev, sizeof(*st));\ndrivers/iio/adc/ad7380.c-1893-\tif (!indio_dev)\n--\ndrivers/iio/adc/ad7405.c=166=static int ad7405_probe(struct platform_device *pdev)\n--\ndrivers/iio/adc/ad7405.c-173-\ndrivers/iio/adc/ad7405.c:174:\tindio_dev = devm_iio_device_alloc(dev, sizeof(*st));\ndrivers/iio/adc/ad7405.c-175-\tif (!indio_dev)\n--\ndrivers/iio/adc/ad7476.c=314=static int ad7476_probe(struct spi_device *spi)\n--\ndrivers/iio/adc/ad7476.c-320-\ndrivers/iio/adc/ad7476.c:321:\tindio_dev = devm_iio_device_alloc(\u0026spi-\u003edev, sizeof(*st));\ndrivers/iio/adc/ad7476.c-322-\tif (!indio_dev)\n--\ndrivers/iio/adc/ad7606.c=1490=int ad7606_probe(struct device *dev, int irq, void __iomem *base_address,\n--\ndrivers/iio/adc/ad7606.c-1497-\ndrivers/iio/adc/ad7606.c:1498:\tindio_dev = devm_iio_device_alloc(dev, sizeof(*st));\ndrivers/iio/adc/ad7606.c-1499-\tif (!indio_dev)\n--\ndrivers/iio/adc/ad7625.c=558=static int ad7625_probe(struct platform_device *pdev)\n--\ndrivers/iio/adc/ad7625.c-565-\ndrivers/iio/adc/ad7625.c:566:\tindio_dev = devm_iio_device_alloc(dev, sizeof(*st));\ndrivers/iio/adc/ad7625.c-567-\tif (!indio_dev)\n--\ndrivers/iio/adc/ad7766.c=204=static int ad7766_probe(struct spi_device *spi)\n--\ndrivers/iio/adc/ad7766.c-210-\ndrivers/iio/adc/ad7766.c:211:\tindio_dev = devm_iio_device_alloc(\u0026spi-\u003edev, sizeof(*ad7766));\ndrivers/iio/adc/ad7766.c-212-\tif (!indio_dev)\n--\ndrivers/iio/adc/ad7768-1.c=1804=static int ad7768_probe(struct spi_device *spi)\n--\ndrivers/iio/adc/ad7768-1.c-1810-\ndrivers/iio/adc/ad7768-1.c:1811:\tindio_dev = devm_iio_device_alloc(\u0026spi-\u003edev, sizeof(*st));\ndrivers/iio/adc/ad7768-1.c-1812-\tif (!indio_dev)\n--\ndrivers/iio/adc/ad7779.c=902=static int ad7779_probe(struct spi_device *spi)\n--\ndrivers/iio/adc/ad7779.c-909-\ndrivers/iio/adc/ad7779.c:910:\tindio_dev = devm_iio_device_alloc(dev, sizeof(*st));\ndrivers/iio/adc/ad7779.c-911-\tif (!indio_dev)\n--\ndrivers/iio/adc/ad7780.c=308=static int ad7780_probe(struct spi_device *spi)\n--\ndrivers/iio/adc/ad7780.c-313-\ndrivers/iio/adc/ad7780.c:314:\tindio_dev = devm_iio_device_alloc(\u0026spi-\u003edev, sizeof(*st));\ndrivers/iio/adc/ad7780.c-315-\tif (!indio_dev)\n--\ndrivers/iio/adc/ad7791.c=408=static int ad7791_probe(struct spi_device *spi)\n--\ndrivers/iio/adc/ad7791.c-419-\ndrivers/iio/adc/ad7791.c:420:\tindio_dev = devm_iio_device_alloc(\u0026spi-\u003edev, sizeof(*st));\ndrivers/iio/adc/ad7791.c-421-\tif (!indio_dev)\n--\ndrivers/iio/adc/ad7793.c=775=static int ad7793_probe(struct spi_device *spi)\n--\ndrivers/iio/adc/ad7793.c-791-\ndrivers/iio/adc/ad7793.c:792:\tindio_dev = devm_iio_device_alloc(\u0026spi-\u003edev, sizeof(*st));\ndrivers/iio/adc/ad7793.c-793-\tif (indio_dev == NULL)\n--\ndrivers/iio/adc/ad7887.c=234=static int ad7887_probe(struct spi_device *spi)\n--\ndrivers/iio/adc/ad7887.c-241-\ndrivers/iio/adc/ad7887.c:242:\tindio_dev = devm_iio_device_alloc(\u0026spi-\u003edev, sizeof(*st));\ndrivers/iio/adc/ad7887.c-243-\tif (indio_dev == NULL)\n--\ndrivers/iio/adc/ad7923.c=301=static int ad7923_probe(struct spi_device *spi)\n--\ndrivers/iio/adc/ad7923.c-308-\ndrivers/iio/adc/ad7923.c:309:\tindio_dev = devm_iio_device_alloc(\u0026spi-\u003edev, sizeof(*st));\ndrivers/iio/adc/ad7923.c-310-\tif (!indio_dev)\n--\ndrivers/iio/adc/ad7944.c=639=static int ad7944_probe(struct spi_device *spi)\n--\ndrivers/iio/adc/ad7944.c-650-\ndrivers/iio/adc/ad7944.c:651:\tindio_dev = devm_iio_device_alloc(dev, sizeof(*adc));\ndrivers/iio/adc/ad7944.c-652-\tif (!indio_dev)\n--\ndrivers/iio/adc/ad7949.c=309=static int ad7949_spi_probe(struct spi_device *spi)\n--\ndrivers/iio/adc/ad7949.c-317-\ndrivers/iio/adc/ad7949.c:318:\tindio_dev = devm_iio_device_alloc(dev, sizeof(*ad7949_adc));\ndrivers/iio/adc/ad7949.c-319-\tif (!indio_dev)\n--\ndrivers/iio/adc/ad799x.c=784=static int ad799x_probe(struct i2c_client *client)\n--\ndrivers/iio/adc/ad799x.c-793-\ndrivers/iio/adc/ad799x.c:794:\tindio_dev = devm_iio_device_alloc(\u0026client-\u003edev, sizeof(*st));\ndrivers/iio/adc/ad799x.c-795-\tif (indio_dev == NULL)\n--\ndrivers/iio/adc/ad9467.c=1312=static int ad9467_probe(struct spi_device *spi)\n--\ndrivers/iio/adc/ad9467.c-1319-\ndrivers/iio/adc/ad9467.c:1320:\tindio_dev = devm_iio_device_alloc(dev, sizeof(*st));\ndrivers/iio/adc/ad9467.c-1321-\tif (!indio_dev)\n--\ndrivers/iio/adc/ade9000.c=1681=static int ade9000_probe(struct spi_device *spi)\n--\ndrivers/iio/adc/ade9000.c-1688-\ndrivers/iio/adc/ade9000.c:1689:\tindio_dev = devm_iio_device_alloc(dev, sizeof(*st));\ndrivers/iio/adc/ade9000.c-1690-\tif (!indio_dev)\n--\ndrivers/iio/adc/aspeed_adc.c=514=static int aspeed_adc_probe(struct platform_device *pdev)\n--\ndrivers/iio/adc/aspeed_adc.c-524-\ndrivers/iio/adc/aspeed_adc.c:525:\tindio_dev = devm_iio_device_alloc(dev, sizeof(*data));\ndrivers/iio/adc/aspeed_adc.c-526-\tif (!indio_dev)\n--\ndrivers/iio/adc/at91-sama5d2_adc.c=2297=static int at91_adc_probe(struct platform_device *pdev)\n--\ndrivers/iio/adc/at91-sama5d2_adc.c-2305-\ndrivers/iio/adc/at91-sama5d2_adc.c:2306:\tindio_dev = devm_iio_device_alloc(\u0026pdev-\u003edev, sizeof(*st));\ndrivers/iio/adc/at91-sama5d2_adc.c-2307-\tif (!indio_dev)\n--\ndrivers/iio/adc/at91_adc.c=989=static int at91_adc_probe(struct platform_device *pdev)\n--\ndrivers/iio/adc/at91_adc.c-998-\ndrivers/iio/adc/at91_adc.c:999:\tidev = devm_iio_device_alloc(\u0026pdev-\u003edev, sizeof(struct at91_adc_state));\ndrivers/iio/adc/at91_adc.c-1000-\tif (!idev)\n--\ndrivers/iio/adc/axp20x_adc.c=1092=static int axp20x_probe(struct platform_device *pdev)\n--\ndrivers/iio/adc/axp20x_adc.c-1100-\ndrivers/iio/adc/axp20x_adc.c:1101:\tindio_dev = devm_iio_device_alloc(\u0026pdev-\u003edev, sizeof(*info));\ndrivers/iio/adc/axp20x_adc.c-1102-\tif (!indio_dev)\n--\ndrivers/iio/adc/axp288_adc.c=258=static int axp288_adc_probe(struct platform_device *pdev)\n--\n\n"
} |
| 17/2 | 2026/09/18 08:05 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 30096 output: 31 thoughts: 28 Thoughts: Here's my attempt at summarizing the thought process, tailored for an expert audience: **Diving into the IIO Core: Allocating the Device** Okay, time to get my hands dirty. I need to understand the lifecycle of an IIO device and how it's brought into existence. First things first, let's trace the allocation path. I'm going to jump straight into the heart of the matter – the `iio_device_alloc` function. I need to examine its implementation, specifically the one residing within `drivers/iio/industrialio-core.c`. I expect to find the fundamental setup: the memory allocation for the `iio_dev` structure itself, initialization of key fields, and potentially some basic resource management. From there, I'll probably look to see how it ties into the broader IIO framework and how this allocation feeds into device registration and driver binding. I'm hoping it's a clean and well-defined procedure, as the foundation is always key to the stability of the entire system. |
| 18/2 | 2026/09/18 08:05 | tool | grepper |
0mArgs:{
"Expression": "void iio_device_free",
"PathPrefix": "drivers/iio"
}Results: {
"Output": "drivers/iio/industrialio-core.c=1732=EXPORT_SYMBOL(iio_device_alloc);\n--\ndrivers/iio/industrialio-core.c-1737- */\ndrivers/iio/industrialio-core.c:1738:void iio_device_free(struct iio_dev *dev)\ndrivers/iio/industrialio-core.c-1739-{\n"
} |
| 19/2 | 2026/09/18 08:05 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 30488 output: 40 thoughts: 22 Thoughts: Here's a summary of my thought process, as if I were the one thinking it: **Diving into the IIO Core** Alright, time to crack open `drivers/iio/industrialio-core.c`. Let's see what's going on in the heart of the Industrial I/O subsystem. Specifically, I'm going to look at that line, 1738. I'm expecting to find something important related to either device registration, attribute handling, or interrupt management – something crucial to the IIO's operational flow. This is where the rubber meets the road, so to speak. Let's get to it. |
| 20/2 | 2026/09/18 08:05 | tool | read-file |
0mArgs:{
"File": "drivers/iio/industrialio-core.c",
"FirstLine": 1735,
"LineCount": 25
}Results: {
"Contents": "1735:\t * iio_device_free() - free an iio_dev from a driver\n1736:\t * @dev:\t\tthe iio_dev associated with the device\n1737:\t */\n1738:\tvoid iio_device_free(struct iio_dev *dev)\n1739:\t{\n1740:\t\tif (dev)\n1741:\t\t\tput_device(\u0026dev-\u003edev);\n1742:\t}\n1743:\tEXPORT_SYMBOL(iio_device_free);\n1744:\t\n1745:\tstatic void devm_iio_device_release(void *iio_dev)\n1746:\t{\n1747:\t\tiio_device_free(iio_dev);\n1748:\t}\n1749:\t\n1750:\t/**\n1751:\t * devm_iio_device_alloc - Resource-managed iio_device_alloc()\n1752:\t * @parent:\t\tDevice to allocate iio_dev for, and parent for this IIO device\n1753:\t * @sizeof_priv:\tSpace to allocate for private structure.\n1754:\t *\n1755:\t * Managed iio_device_alloc. iio_dev allocated with this function is\n1756:\t * automatically freed on driver detach.\n1757:\t *\n1758:\t * Returns:\n1759:\t * Pointer to allocated iio_dev on success, NULL on failure.\n"
} |
| 21/2 | 2026/09/18 08:05 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 31088 output: 30 thoughts: 38 Thoughts: Okay, let's dive into this. Here's how I'd approach this, thinking through the process as if it were my own investigation. **Investigating `put_device()` and Device Release** Alright, I'm at a point where I need to understand the interaction between `put_device(&dev->dev)` and the eventual release of `dev->dev`. I'm going to track down what happens in the `iio_dev_release` function, as that's where I assume the details of the release process are handled, particularly if `dev->dev` is a struct I want to examine closely. My immediate goal is to understand any potential race conditions, resource leaks, or unexpected behavior that could occur if this device is released while `put_device()` is still being called or is in the process of calling related functions. I want to build a clear mental model of how this release process unfolds, including understanding any potential reference counting or locking mechanisms that are being used to maintain the device's lifecycle. I'll probably look at the function's definition, how it's called, and any other functions it calls. I'm especially interested in how the `put_device` is paired with calls to `get_device`. I need to fully understand how these functions interact to ensure proper device lifecycle management within the framework. |
| 22/2 | 2026/09/18 08:06 | tool | grepper |
0mArgs:{
"Expression": "iio_dev_release",
"PathPrefix": "drivers/iio"
}Results: {
"Output": "drivers/iio/industrialio-core.c=1633=static void iio_device_unregister_sysfs(struct iio_dev *indio_dev)\n--\ndrivers/iio/industrialio-core.c-1643-\ndrivers/iio/industrialio-core.c:1644:static void iio_dev_release(struct device *device)\ndrivers/iio/industrialio-core.c-1645-{\n--\ndrivers/iio/industrialio-core.c=1666=const struct device_type iio_device_type = {\ndrivers/iio/industrialio-core.c-1667-\t.name = \"iio_device\",\ndrivers/iio/industrialio-core.c:1668:\t.release = iio_dev_release,\ndrivers/iio/industrialio-core.c-1669-};\n"
} |
| 23/2 | 2026/09/18 08:06 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 31670 output: 40 thoughts: 12 Thoughts: Okay, let's dive into this. Here's my take on `iio_dev_release`, as if these are my immediate thoughts: **Dissecting `iio_dev_release`** Alright, `iio_dev_release`. Immediately, I know this is a function related to the Industrial I/O (IIO) subsystem. It's obviously designed for resource cleanup, the "release" part is a dead giveaway. Since I'm in this domain, I'm expecting this function to be critical for avoiding memory leaks, dangling pointers, and generally keeping the IIO infrastructure clean and well-behaved, especially during device removal or driver unloading. I'm mentally running through the probable use cases. This is likely called when an IIO device instance is being destroyed, perhaps when a device is unplugged, the driver is unbound, or the module itself is unloaded. It has to handle releasing any resources that were allocated specifically for that device. I'm thinking about things like: * **Freeing allocated memory:** Device-specific data structures, buffers, etc. * **Releasing kernel locks:** mutexes, spinlocks, that were held by the device. Remember, IIO devices often work in an interrupt-driven manner, so I'm expecting some kind of protection. * **Cleaning up device-specific data:** Closing file descriptors, removing sysfs entries, or maybe freeing interrupt lines. * **Invalidating references:** Removing the device from any lists or data structures, to prevent further access to now-invalidated memory. This is crucial for stability. * **Potentially unregistering the device from IIO subsystem:** Removing the device from its parent, preventing it from showing up in sysfs or being accessed through the IIO character device. I'm hoping to see well-defined error handling within this function. It should gracefully handle situations where a resource might have already been released or where an operation fails, without causing a kernel panic or a general system hang. No dangling pointers allowed! I’m expecting a robust approach here, considering the kernel context this runs in and the possibility of other code paths depending on the safe release of the IIO device. The structure should reflect the IIO framework - a clear hierarchy of functions, with specific functions to release specific resources. Time to see if my intuitions are spot on. Let's see how well it's implemented. |
| 24/2 | 2026/09/18 08:06 | tool | read-file |
0mArgs:{
"File": "drivers/iio/industrialio-core.c",
"FirstLine": 1643,
"LineCount": 25
}Results: {
"Contents": "1643:\t\n1644:\tstatic void iio_dev_release(struct device *device)\n1645:\t{\n1646:\t\tstruct iio_dev *indio_dev = dev_to_iio_dev(device);\n1647:\t\tstruct iio_dev_opaque *iio_dev_opaque = to_iio_dev_opaque(indio_dev);\n1648:\t\n1649:\t\tif (indio_dev-\u003emodes \u0026 INDIO_ALL_TRIGGERED_MODES)\n1650:\t\t\tiio_device_unregister_trigger_consumer(indio_dev);\n1651:\t\tiio_device_unregister_eventset(indio_dev);\n1652:\t\tiio_device_unregister_sysfs(indio_dev);\n1653:\t\n1654:\t\tiio_device_detach_buffers(indio_dev);\n1655:\t\n1656:\t\tmutex_destroy(\u0026iio_dev_opaque-\u003einfo_exist_lock);\n1657:\t\tmutex_destroy(\u0026iio_dev_opaque-\u003emlock);\n1658:\t\n1659:\t\tlockdep_unregister_key(\u0026iio_dev_opaque-\u003einfo_exist_key);\n1660:\t\tlockdep_unregister_key(\u0026iio_dev_opaque-\u003emlock_key);\n1661:\t\n1662:\t\tida_free(\u0026iio_ida, iio_dev_opaque-\u003eid);\n1663:\t\tkfree(iio_dev_opaque);\n1664:\t}\n1665:\t\n1666:\tconst struct device_type iio_device_type = {\n1667:\t\t.name = \"iio_device\",\n"
} |
| 25/2 | 2026/09/18 08:06 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 32688 output: 35 thoughts: 69 Thoughts: Here's my summary, as if I were thinking it: **Digging into the IIO Device Release** Okay, so I'm looking at `iio_dev_release`, specifically that conditional. The first thing that jumps out is that check against `INDIO_ALL_TRIGGERED_MODES`. It looks like if a device is using *any* triggered mode, it needs to unregister its trigger consumer before release. Smart. Ensures we're cleaning up properly. Now, the natural next step is to figure out *where* that trigger consumer got registered in the first place, or rather, where the mode gets set. Let me see what `devm_iio_triggered_buffer_setup` is doing; that seems like the logical place to start. Let's see what that gets us. I'll bet that's where the magic happens... |
| 26/2 | 2026/09/18 08:06 | tool | grepper |
0mArgs:{
"Expression": "devm_iio_triggered_buffer_setup",
"PathPrefix": "drivers/iio"
}Results: {
"Output": "\nFull output is too long, showing 500 out of 755 lines.\nUse more precise expression if possible.\n\ndrivers/iio/accel/adxl355_core.c=788=int adxl355_core_probe(struct device *dev, struct regmap *regmap,\n--\ndrivers/iio/accel/adxl355_core.c-819-\ndrivers/iio/accel/adxl355_core.c:820:\tret = devm_iio_triggered_buffer_setup(dev, indio_dev,\ndrivers/iio/accel/adxl355_core.c-821-\t\t\t\t\t \u0026iio_pollfunc_store_time,\n--\ndrivers/iio/accel/adxl372.c=1234=static int adxl372_buffer_setup(struct iio_dev *indio_dev)\n--\ndrivers/iio/accel/adxl372.c-1239-\ndrivers/iio/accel/adxl372.c:1240:\tret = devm_iio_triggered_buffer_setup_ext(dev, indio_dev, NULL,\ndrivers/iio/accel/adxl372.c-1241-\t\t\t\t\t\t adxl372_trigger_handler,\n--\ndrivers/iio/accel/bma220_core.c=501=int bma220_common_probe(struct device *dev, struct regmap *regmap, int irq)\n--\ndrivers/iio/accel/bma220_core.c-555-\ndrivers/iio/accel/bma220_core.c:556:\tret = devm_iio_triggered_buffer_setup(dev, indio_dev, NULL,\ndrivers/iio/accel/bma220_core.c-557-\t\t\t\t\t bma220_trigger_handler, NULL);\n--\ndrivers/iio/accel/bma400_core.c=1740=int bma400_probe(struct device *dev, struct regmap *regmap, int irq,\n--\ndrivers/iio/accel/bma400_core.c-1795-\ndrivers/iio/accel/bma400_core.c:1796:\tret = devm_iio_triggered_buffer_setup(dev, indio_dev, NULL,\ndrivers/iio/accel/bma400_core.c-1797-\t\t\t\t\t \u0026bma400_trigger_handler, NULL);\n--\ndrivers/iio/accel/kionix-kx022a.c=1316=int kx022a_probe_internal(struct device *dev, const struct kx022a_chip_info *chip_info)\n--\ndrivers/iio/accel/kionix-kx022a.c-1406-\ndrivers/iio/accel/kionix-kx022a.c:1407:\tret = devm_iio_triggered_buffer_setup_ext(dev, idev,\ndrivers/iio/accel/kionix-kx022a.c-1408-\t\t\t\t\t\t \u0026iio_pollfunc_store_time,\n--\ndrivers/iio/accel/msa311.c=1141=static int msa311_probe(struct i2c_client *i2c)\n--\ndrivers/iio/accel/msa311.c-1214-\ndrivers/iio/accel/msa311.c:1215:\terr = devm_iio_triggered_buffer_setup(dev, indio_dev,\ndrivers/iio/accel/msa311.c-1216-\t\t\t\t\t iio_pollfunc_store_time,\n--\ndrivers/iio/accel/mxc4005.c=428=static int mxc4005_probe(struct i2c_client *client)\n--\ndrivers/iio/accel/mxc4005.c-470-\ndrivers/iio/accel/mxc4005.c:471:\tret = devm_iio_triggered_buffer_setup(\u0026client-\u003edev, indio_dev,\ndrivers/iio/accel/mxc4005.c-472-\t\t\t\t\t iio_pollfunc_store_time,\n--\ndrivers/iio/accel/sca3300.c=611=static int sca3300_probe(struct spi_device *spi)\n--\ndrivers/iio/accel/sca3300.c-640-\ndrivers/iio/accel/sca3300.c:641:\tret = devm_iio_triggered_buffer_setup(\u0026spi-\u003edev, indio_dev,\ndrivers/iio/accel/sca3300.c-642-\t\t\t\t\t iio_pollfunc_store_time,\n--\ndrivers/iio/accel/st_accel_buffer.c=62=int st_accel_allocate_ring(struct iio_dev *indio_dev)\ndrivers/iio/accel/st_accel_buffer.c-63-{\ndrivers/iio/accel/st_accel_buffer.c:64:\treturn devm_iio_triggered_buffer_setup(indio_dev-\u003edev.parent, indio_dev,\ndrivers/iio/accel/st_accel_buffer.c-65-\t\tNULL, \u0026st_sensors_trigger_handler, \u0026st_accel_buffer_setup_ops);\n--\ndrivers/iio/adc/ad4000.c=1004=static int ad4000_probe(struct spi_device *spi)\n--\ndrivers/iio/adc/ad4000.c-1052-\t} else {\ndrivers/iio/adc/ad4000.c:1053:\t\tret = devm_iio_triggered_buffer_setup(dev, indio_dev,\ndrivers/iio/adc/ad4000.c-1054-\t\t\t\t\t\t \u0026iio_pollfunc_store_time,\n--\ndrivers/iio/adc/ad4030.c=1426=static int ad4030_probe(struct spi_device *spi)\n--\ndrivers/iio/adc/ad4030.c-1500-\ndrivers/iio/adc/ad4030.c:1501:\t\tret = devm_iio_triggered_buffer_setup(dev, indio_dev,\ndrivers/iio/adc/ad4030.c-1502-\t\t\t\t\t\t iio_pollfunc_store_time,\n--\ndrivers/iio/adc/ad4062.c=1484=static int ad4062_probe(struct i3c_device *i3cdev)\n--\ndrivers/iio/adc/ad4062.c-1545-\ndrivers/iio/adc/ad4062.c:1546:\tret = devm_iio_triggered_buffer_setup(\u0026i3cdev-\u003edev, indio_dev,\ndrivers/iio/adc/ad4062.c-1547-\t\t\t\t\t iio_pollfunc_store_time,\n--\ndrivers/iio/adc/ad4170-4.c=2925=static int ad4170_probe(struct spi_device *spi)\n--\ndrivers/iio/adc/ad4170-4.c-2988-\ndrivers/iio/adc/ad4170-4.c:2989:\tret = devm_iio_triggered_buffer_setup(dev, indio_dev, NULL,\ndrivers/iio/adc/ad4170-4.c-2990-\t\t\t\t\t \u0026ad4170_trigger_handler,\n--\ndrivers/iio/adc/ad4695.c=1790=static int ad4695_probe(struct spi_device *spi)\n--\ndrivers/iio/adc/ad4695.c-1971-\ndrivers/iio/adc/ad4695.c:1972:\t\tret = devm_iio_triggered_buffer_setup(dev, indio_dev,\ndrivers/iio/adc/ad4695.c-1973-\t\t\t\t\t\t iio_pollfunc_store_time,\n--\ndrivers/iio/adc/ad7266.c=382=static int ad7266_probe(struct spi_device *spi)\n--\ndrivers/iio/adc/ad7266.c-446-\ndrivers/iio/adc/ad7266.c:447:\tret = devm_iio_triggered_buffer_setup(\u0026spi-\u003edev, indio_dev, \u0026iio_pollfunc_store_time,\ndrivers/iio/adc/ad7266.c-448-\t\t\u0026ad7266_trigger_handler, \u0026iio_triggered_buffer_setup_ops);\n--\ndrivers/iio/adc/ad7298.c=284=static int ad7298_probe(struct spi_device *spi)\n--\ndrivers/iio/adc/ad7298.c-341-\ndrivers/iio/adc/ad7298.c:342:\tret = devm_iio_triggered_buffer_setup(\u0026spi-\u003edev, indio_dev, NULL,\ndrivers/iio/adc/ad7298.c-343-\t\t\t\u0026ad7298_trigger_handler, NULL);\n--\ndrivers/iio/adc/ad7380.c=1884=static int ad7380_probe(struct spi_device *spi)\n--\ndrivers/iio/adc/ad7380.c-2076-\tif (ret == -ENODEV) {\ndrivers/iio/adc/ad7380.c:2077:\t\tret = devm_iio_triggered_buffer_setup(dev, indio_dev,\ndrivers/iio/adc/ad7380.c-2078-\t\t\t\t\t\t iio_pollfunc_store_time,\n--\ndrivers/iio/adc/ad7476.c=314=static int ad7476_probe(struct spi_device *spi)\n--\ndrivers/iio/adc/ad7476.c-401-\ndrivers/iio/adc/ad7476.c:402:\tret = devm_iio_triggered_buffer_setup(\u0026spi-\u003edev, indio_dev, NULL,\ndrivers/iio/adc/ad7476.c-403-\t\t\t\t\t \u0026ad7476_trigger_handler, NULL);\n--\ndrivers/iio/adc/ad7606.c=1490=int ad7606_probe(struct device *dev, int irq, void __iomem *base_address,\n--\ndrivers/iio/adc/ad7606.c-1648-\ndrivers/iio/adc/ad7606.c:1649:\t\tret = devm_iio_triggered_buffer_setup(dev, indio_dev,\ndrivers/iio/adc/ad7606.c-1650-\t\t\t\t\t\t \u0026iio_pollfunc_store_time,\n--\ndrivers/iio/adc/ad7766.c=204=static int ad7766_probe(struct spi_device *spi)\n--\ndrivers/iio/adc/ad7766.c-277-\ndrivers/iio/adc/ad7766.c:278:\tret = devm_iio_triggered_buffer_setup(\u0026spi-\u003edev, indio_dev,\ndrivers/iio/adc/ad7766.c-279-\t\t\u0026iio_pollfunc_store_time, \u0026ad7766_trigger_handler,\n--\ndrivers/iio/adc/ad7768-1.c=1491=static int ad7768_triggered_buffer_alloc(struct iio_dev *indio_dev)\n--\ndrivers/iio/adc/ad7768-1.c-1509-\ndrivers/iio/adc/ad7768-1.c:1510:\treturn devm_iio_triggered_buffer_setup(indio_dev-\u003edev.parent, indio_dev,\ndrivers/iio/adc/ad7768-1.c-1511-\t\t\t\t\t \u0026iio_pollfunc_store_time,\n--\ndrivers/iio/adc/ad7779.c=824=static int ad7779_setup_without_backend(struct ad7779_state *st, struct iio_dev *indio_dev)\n--\ndrivers/iio/adc/ad7779.c-856-\ndrivers/iio/adc/ad7779.c:857:\tret = devm_iio_triggered_buffer_setup(dev, indio_dev,\ndrivers/iio/adc/ad7779.c-858-\t\t\t\t\t \u0026iio_pollfunc_store_time,\n--\ndrivers/iio/adc/ad7887.c=234=static int ad7887_probe(struct spi_device *spi)\n--\ndrivers/iio/adc/ad7887.c-320-\ndrivers/iio/adc/ad7887.c:321:\tret = devm_iio_triggered_buffer_setup(\u0026spi-\u003edev, indio_dev,\ndrivers/iio/adc/ad7887.c-322-\t\t\t\u0026iio_pollfunc_store_time,\n--\ndrivers/iio/adc/ad7923.c=301=static int ad7923_probe(struct spi_device *spi)\n--\ndrivers/iio/adc/ad7923.c-353-\ndrivers/iio/adc/ad7923.c:354:\tret = devm_iio_triggered_buffer_setup(\u0026spi-\u003edev, indio_dev, NULL,\ndrivers/iio/adc/ad7923.c-355-\t\t\t\t\t \u0026ad7923_trigger_handler, NULL);\n--\ndrivers/iio/adc/ad7944.c=639=static int ad7944_probe(struct spi_device *spi)\n--\ndrivers/iio/adc/ad7944.c-802-\ndrivers/iio/adc/ad7944.c:803:\t\tret = devm_iio_triggered_buffer_setup(dev, indio_dev,\ndrivers/iio/adc/ad7944.c-804-\t\t\t\t\t\t iio_pollfunc_store_time,\n--\ndrivers/iio/adc/ad_sigma_delta.c=803=int devm_ad_sd_setup_buffer_and_trigger(struct device *dev, struct iio_dev *indio_dev)\n--\ndrivers/iio/adc/ad_sigma_delta.c-828-\t} else {\ndrivers/iio/adc/ad_sigma_delta.c:829:\t\tret = devm_iio_triggered_buffer_setup(dev, indio_dev,\ndrivers/iio/adc/ad_sigma_delta.c-830-\t\t\t\t\t\t \u0026iio_pollfunc_store_time,\n--\ndrivers/iio/adc/at91-sama5d2_adc.c=2211=static int at91_adc_buffer_and_trigger_init(struct device *dev,\n--\ndrivers/iio/adc/at91-sama5d2_adc.c-2222-\ndrivers/iio/adc/at91-sama5d2_adc.c:2223:\tret = devm_iio_triggered_buffer_setup_ext(\u0026indio-\u003edev, indio,\ndrivers/iio/adc/at91-sama5d2_adc.c-2224-\t\t\u0026iio_pollfunc_store_time, \u0026at91_adc_trigger_handler,\n--\ndrivers/iio/adc/cc10001_adc.c=315=static int cc10001_adc_probe(struct platform_device *pdev)\n--\ndrivers/iio/adc/cc10001_adc.c-389-\ndrivers/iio/adc/cc10001_adc.c:390:\tret = devm_iio_triggered_buffer_setup(dev, indio_dev, NULL,\ndrivers/iio/adc/cc10001_adc.c-391-\t\t\t\t\t \u0026cc10001_adc_trigger_h, NULL);\n--\ndrivers/iio/adc/dln2-adc.c=578=static int dln2_adc_probe(struct platform_device *pdev)\n--\ndrivers/iio/adc/dln2-adc.c-639-\ndrivers/iio/adc/dln2-adc.c:640:\tret = devm_iio_triggered_buffer_setup(dev, indio_dev, NULL,\ndrivers/iio/adc/dln2-adc.c-641-\t\t\t\t\t dln2_adc_trigger_h,\n--\ndrivers/iio/adc/hx711.c=458=static int hx711_probe(struct platform_device *pdev)\n--\ndrivers/iio/adc/hx711.c-541-\ndrivers/iio/adc/hx711.c:542:\tret = devm_iio_triggered_buffer_setup(dev, indio_dev,\ndrivers/iio/adc/hx711.c-543-\t\t\t\t\t iio_pollfunc_store_time,\n--\ndrivers/iio/adc/max1027.c=528=static int max1027_probe(struct spi_device *spi)\n--\ndrivers/iio/adc/max1027.c-560-\t/* Enable triggered buffers */\ndrivers/iio/adc/max1027.c:561:\tret = devm_iio_triggered_buffer_setup(\u0026spi-\u003edev, indio_dev,\ndrivers/iio/adc/max1027.c-562-\t\t\t\t\t \u0026iio_pollfunc_store_time,\n--\ndrivers/iio/adc/max1118.c=206=static int max1118_probe(struct spi_device *spi)\n--\ndrivers/iio/adc/max1118.c-250-\ndrivers/iio/adc/max1118.c:251:\tret = devm_iio_triggered_buffer_setup(\u0026spi-\u003edev, indio_dev, NULL,\ndrivers/iio/adc/max1118.c-252-\t\t\t\t\t max1118_trigger_handler, NULL);\n--\ndrivers/iio/adc/max11410.c=913=static int max11410_probe(struct spi_device *spi)\n--\ndrivers/iio/adc/max11410.c-986-\ndrivers/iio/adc/max11410.c:987:\tret = devm_iio_triggered_buffer_setup(dev, indio_dev, NULL,\ndrivers/iio/adc/max11410.c-988-\t\t\t\t\t \u0026max11410_trigger_handler,\n--\ndrivers/iio/adc/max1363.c=1558=static int max1363_probe(struct i2c_client *client)\n--\ndrivers/iio/adc/max1363.c-1610-\ndrivers/iio/adc/max1363.c:1611:\tret = devm_iio_triggered_buffer_setup(\u0026client-\u003edev, indio_dev, NULL,\ndrivers/iio/adc/max1363.c-1612-\t\t\t\t\t \u0026max1363_trigger_handler, NULL);\n--\ndrivers/iio/adc/mcp3911.c=708=static int mcp3911_probe(struct spi_device *spi)\n--\ndrivers/iio/adc/mcp3911.c-823-\ndrivers/iio/adc/mcp3911.c:824:\tret = devm_iio_triggered_buffer_setup(dev, indio_dev, NULL,\ndrivers/iio/adc/mcp3911.c-825-\t\t\t\t\t mcp3911_trigger_handler, NULL);\n--\ndrivers/iio/adc/mt6360-adc.c=311=static int mt6360_adc_probe(struct platform_device *pdev)\n--\ndrivers/iio/adc/mt6360-adc.c-344-\ndrivers/iio/adc/mt6360-adc.c:345:\tret = devm_iio_triggered_buffer_setup(\u0026pdev-\u003edev, indio_dev, NULL,\ndrivers/iio/adc/mt6360-adc.c-346-\t\t\t\t\t mt6360_adc_trigger_handler, NULL);\n--\ndrivers/iio/adc/nxp-sar-adc.c=908=static int nxp_sar_adc_probe(struct platform_device *pdev)\n--\ndrivers/iio/adc/nxp-sar-adc.c-964-\ndrivers/iio/adc/nxp-sar-adc.c:965:\tret = devm_iio_triggered_buffer_setup(dev, indio_dev,\ndrivers/iio/adc/nxp-sar-adc.c-966-\t\t\t\t\t \u0026iio_pollfunc_store_time,\n--\ndrivers/iio/adc/pac1921.c=1227=static int pac1921_probe(struct i2c_client *client)\n--\ndrivers/iio/adc/pac1921.c-1297-\ndrivers/iio/adc/pac1921.c:1298:\tret = devm_iio_triggered_buffer_setup(dev, indio_dev,\ndrivers/iio/adc/pac1921.c-1299-\t\t\t\t\t \u0026iio_pollfunc_store_time,\n--\ndrivers/iio/adc/rockchip_saradc.c=455=static int rockchip_saradc_probe(struct platform_device *pdev)\n--\ndrivers/iio/adc/rockchip_saradc.c-553-\tindio_dev-\u003enum_channels = info-\u003edata-\u003enum_channels;\ndrivers/iio/adc/rockchip_saradc.c:554:\tret = devm_iio_triggered_buffer_setup(dev, indio_dev, NULL,\ndrivers/iio/adc/rockchip_saradc.c-555-\t\t\t\t\t rockchip_saradc_trigger_handler,\n--\ndrivers/iio/adc/rtq6056.c=718=static int rtq6056_probe(struct i2c_client *i2c)\n--\ndrivers/iio/adc/rtq6056.c-799-\ndrivers/iio/adc/rtq6056.c:800:\tret = devm_iio_triggered_buffer_setup(dev, indio_dev, NULL,\ndrivers/iio/adc/rtq6056.c-801-\t\t\t\t\t rtq6056_buffer_trigger_handler,\n--\ndrivers/iio/adc/ti-adc081c.c=151=static int adc081c_probe(struct i2c_client *client)\n--\ndrivers/iio/adc/ti-adc081c.c-190-\ndrivers/iio/adc/ti-adc081c.c:191:\terr = devm_iio_triggered_buffer_setup(\u0026client-\u003edev, iio, NULL,\ndrivers/iio/adc/ti-adc081c.c-192-\t\t\t\t\t adc081c_trigger_handler, NULL);\n--\ndrivers/iio/adc/ti-adc0832.c=243=static int adc0832_probe(struct spi_device *spi)\n--\ndrivers/iio/adc/ti-adc0832.c-298-\ndrivers/iio/adc/ti-adc0832.c:299:\tret = devm_iio_triggered_buffer_setup(\u0026spi-\u003edev, indio_dev, NULL,\ndrivers/iio/adc/ti-adc0832.c-300-\t\t\t\t\t adc0832_trigger_handler, NULL);\n--\ndrivers/iio/adc/ti-adc084s021.c=196=static int adc084s021_probe(struct spi_device *spi)\n--\ndrivers/iio/adc/ti-adc084s021.c-228-\t/* Setup triggered buffer with pollfunction */\ndrivers/iio/adc/ti-adc084s021.c:229:\tret = devm_iio_triggered_buffer_setup(\u0026spi-\u003edev, indio_dev, NULL,\ndrivers/iio/adc/ti-adc084s021.c-230-\t\t\t\t\t adc084s021_buffer_trigger_handler,\n--\ndrivers/iio/adc/ti-adc108s102.c=217=static int adc108s102_probe(struct spi_device *spi)\n--\ndrivers/iio/adc/ti-adc108s102.c-254-\ndrivers/iio/adc/ti-adc108s102.c:255:\tret = devm_iio_triggered_buffer_setup(\u0026spi-\u003edev, indio_dev, NULL,\ndrivers/iio/adc/ti-adc108s102.c-256-\t\t\t\t\t \u0026adc108s102_trigger_handler,\n--\ndrivers/iio/adc/ti-adc161s626.c=172=static int ti_adc_probe(struct spi_device *spi)\n--\ndrivers/iio/adc/ti-adc161s626.c-216-\ndrivers/iio/adc/ti-adc161s626.c:217:\tret = devm_iio_triggered_buffer_setup(\u0026spi-\u003edev, indio_dev, NULL,\ndrivers/iio/adc/ti-adc161s626.c-218-\t\t\t\t\t ti_adc_trigger_handler, NULL);\n--\ndrivers/iio/adc/ti-ads1015.c=933=static int ads1015_probe(struct i2c_client *client)\n--\ndrivers/iio/adc/ti-ads1015.c-984-\ndrivers/iio/adc/ti-ads1015.c:985:\tret = devm_iio_triggered_buffer_setup(\u0026client-\u003edev, indio_dev, NULL,\ndrivers/iio/adc/ti-ads1015.c-986-\t\t\t\t\t ads1015_trigger_handler,\n--\ndrivers/iio/adc/ti-ads1018.c=626=static int ads1018_spi_probe(struct spi_device *spi)\n--\ndrivers/iio/adc/ti-ads1018.c-660-\ndrivers/iio/adc/ti-ads1018.c:661:\tret = devm_iio_triggered_buffer_setup(dev, indio_dev,\ndrivers/iio/adc/ti-ads1018.c-662-\t\t\t\t\t iio_pollfunc_store_time,\n--\ndrivers/iio/adc/ti-ads1119.c=687=static int ads1119_probe(struct i2c_client *client)\n--\ndrivers/iio/adc/ti-ads1119.c-733-\ndrivers/iio/adc/ti-ads1119.c:734:\tret = devm_iio_triggered_buffer_setup(dev, indio_dev, NULL,\ndrivers/iio/adc/ti-ads1119.c-735-\t\t\t\t\t ads1119_trigger_handler,\n--\ndrivers/iio/adc/ti-ads124s08.c=308=static int ads124s_probe(struct spi_device *spi)\n--\ndrivers/iio/adc/ti-ads124s08.c-337-\ndrivers/iio/adc/ti-ads124s08.c:338:\tret = devm_iio_triggered_buffer_setup(\u0026spi-\u003edev, indio_dev, NULL,\ndrivers/iio/adc/ti-ads124s08.c-339-\t\t\t\t\t ads124s_trigger_handler, NULL);\n--\ndrivers/iio/adc/ti-ads131e08.c=794=static int ads131e08_probe(struct spi_device *spi)\n--\ndrivers/iio/adc/ti-ads131e08.c-855-\ndrivers/iio/adc/ti-ads131e08.c:856:\tret = devm_iio_triggered_buffer_setup(\u0026spi-\u003edev, indio_dev,\ndrivers/iio/adc/ti-ads131e08.c-857-\t\tNULL, \u0026ads131e08_trigger_handler, NULL);\n--\ndrivers/iio/adc/ti-ads8688.c=411=static int ads8688_probe(struct spi_device *spi)\n--\ndrivers/iio/adc/ti-ads8688.c-444-\ndrivers/iio/adc/ti-ads8688.c:445:\tret = devm_iio_triggered_buffer_setup(\u0026spi-\u003edev, indio_dev, NULL,\ndrivers/iio/adc/ti-ads8688.c-446-\t\t\t\t\t ads8688_trigger_handler, NULL);\n--\ndrivers/iio/adc/ti-lmp92064.c=282=static int lmp92064_adc_probe(struct spi_device *spi)\n--\ndrivers/iio/adc/ti-lmp92064.c-350-\ndrivers/iio/adc/ti-lmp92064.c:351:\tret = devm_iio_triggered_buffer_setup(dev, indio_dev, NULL,\ndrivers/iio/adc/ti-lmp92064.c-352-\t\t\t\t\t lmp92064_trigger_handler, NULL);\n--\ndrivers/iio/adc/ti-tsc2046.c=740=static int tsc2046_adc_probe(struct spi_device *spi)\n--\ndrivers/iio/adc/ti-tsc2046.c-817-\ndrivers/iio/adc/ti-tsc2046.c:818:\tret = devm_iio_triggered_buffer_setup(dev, indio_dev, NULL,\ndrivers/iio/adc/ti-tsc2046.c-819-\t\t\t\t\t \u0026tsc2046_adc_trigger_handler, NULL);\n--\ndrivers/iio/adc/vf610_adc.c=824=static int vf610_adc_probe(struct platform_device *pdev)\n--\ndrivers/iio/adc/vf610_adc.c-891-\ndrivers/iio/adc/vf610_adc.c:892:\tret = devm_iio_triggered_buffer_setup(\u0026pdev-\u003edev, indio_dev, \u0026iio_pollfunc_store_time,\ndrivers/iio/adc/vf610_adc.c-893-\t\t\t\t\t NULL, \u0026iio_triggered_buffer_setup_ops);\n--\ndrivers/iio/adc/xilinx-xadc-core.c=1320=static int xadc_probe(struct platform_device *pdev)\n--\ndrivers/iio/adc/xilinx-xadc-core.c-1364-\tif (xadc-\u003eops-\u003eflags \u0026 XADC_FLAGS_BUFFERED) {\ndrivers/iio/adc/xilinx-xadc-core.c:1365:\t\tret = devm_iio_triggered_buffer_setup(dev, indio_dev,\ndrivers/iio/adc/xilinx-xadc-core.c-1366-\t\t\t\t\t\t \u0026iio_pollfunc_store_time,\n--\ndrivers/iio/addac/ad74115.c=1821=static int ad74115_probe(struct spi_device *spi)\n--\ndrivers/iio/addac/ad74115.c-1879-\ndrivers/iio/addac/ad74115.c:1880:\tret = devm_iio_triggered_buffer_setup(dev, indio_dev, NULL,\ndrivers/iio/addac/ad74115.c-1881-\t\t\t\t\t ad74115_trigger_handler,\n--\ndrivers/iio/addac/ad74413r.c=1345=static int ad74413r_probe(struct spi_device *spi)\n--\ndrivers/iio/addac/ad74413r.c-1462-\ndrivers/iio/addac/ad74413r.c:1463:\tret = devm_iio_triggered_buffer_setup(st-\u003edev, indio_dev,\ndrivers/iio/addac/ad74413r.c-1464-\t\t\t\t\t \u0026iio_pollfunc_store_time,\n--\ndrivers/iio/buffer/industrialio-triggered-buffer.c=112=static void devm_iio_triggered_buffer_clean(void *indio_dev)\n--\ndrivers/iio/buffer/industrialio-triggered-buffer.c-116-\ndrivers/iio/buffer/industrialio-triggered-buffer.c:117:int devm_iio_triggered_buffer_setup_ext(struct device *dev,\ndrivers/iio/buffer/industrialio-triggered-buffer.c-118-\t\t\t\t\tstruct iio_dev *indio_dev,\n--\ndrivers/iio/buffer/industrialio-triggered-buffer.c-134-}\ndrivers/iio/buffer/industrialio-triggered-buffer.c:135:EXPORT_SYMBOL_GPL(devm_iio_triggered_buffer_setup_ext);\ndrivers/iio/buffer/industrialio-triggered-buffer.c-136-\n--\ndrivers/iio/chemical/bme680_core.c=1150=int bme680_core_probe(struct device *dev, struct regmap *regmap,\n--\ndrivers/iio/chemical/bme680_core.c-1219-\ndrivers/iio/chemical/bme680_core.c:1220:\tret = devm_iio_triggered_buffer_setup(dev, indio_dev,\ndrivers/iio/chemical/bme680_core.c-1221-\t\t\t\t\t iio_pollfunc_store_time,\n--\ndrivers/iio/chemical/ens160_core.c=328=int devm_ens160_core_probe(struct device *dev, struct regmap *regmap, int irq,\n--\ndrivers/iio/chemical/ens160_core.c-360-\ndrivers/iio/chemical/ens160_core.c:361:\tret = devm_iio_triggered_buffer_setup(dev, indio_dev,\ndrivers/iio/chemical/ens160_core.c-362-\t\t\t\t\t iio_pollfunc_store_time,\n--\ndrivers/iio/chemical/pms7003.c=271=static int pms7003_probe(struct serdev_device *serdev)\n--\ndrivers/iio/chemical/pms7003.c-321-\ndrivers/iio/chemical/pms7003.c:322:\tret = devm_iio_triggered_buffer_setup(\u0026serdev-\u003edev, indio_dev, NULL,\ndrivers/iio/chemical/pms7003.c-323-\t\t\t\t\t pms7003_trigger_handler, NULL);\n--\ndrivers/iio/chemical/scd30_core.c=665=int scd30_probe(struct device *dev, int irq, const char *name, void *priv,\n--\ndrivers/iio/chemical/scd30_core.c-718-\ndrivers/iio/chemical/scd30_core.c:719:\tret = devm_iio_triggered_buffer_setup(dev, indio_dev, NULL, scd30_trigger_handler, NULL);\ndrivers/iio/chemical/scd30_core.c-720-\tif (ret)\n--\ndrivers/iio/chemical/scd4x.c=687=static int scd4x_probe(struct i2c_client *client)\n--\ndrivers/iio/chemical/scd4x.c-731-\ndrivers/iio/chemical/scd4x.c:732:\tret = devm_iio_triggered_buffer_setup(dev, indio_dev, NULL, scd4x_trigger_handler, NULL);\ndrivers/iio/chemical/scd4x.c-733-\tif (ret)\n--\ndrivers/iio/chemical/sps30.c=327=int sps30_probe(struct device *dev, const char *name, void *priv, const struct sps30_ops *ops)\n--\ndrivers/iio/chemical/sps30.c-367-\ndrivers/iio/chemical/sps30.c:368:\tret = devm_iio_triggered_buffer_setup(dev, indio_dev, NULL,\ndrivers/iio/chemical/sps30.c-369-\t\t\t\t\t sps30_trigger_handler, NULL);\n--\ndrivers/iio/common/cros_ec_sensors/cros_ec_lid_angle.c=90=static int cros_ec_lid_angle_probe(struct platform_device *pdev)\n--\ndrivers/iio/common/cros_ec_sensors/cros_ec_lid_angle.c-111-\ndrivers/iio/common/cros_ec_sensors/cros_ec_lid_angle.c:112:\tret = devm_iio_triggered_buffer_setup(dev, indio_dev, NULL,\ndrivers/iio/common/cros_ec_sensors/cros_ec_lid_angle.c-113-\t\t\tcros_ec_sensors_capture, NULL);\n--\ndrivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c=236=int cros_ec_sensors_core_init(struct platform_device *pdev,\n--\ndrivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c-346-\t\t\t */\ndrivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c:347:\t\t\tret = devm_iio_triggered_buffer_setup(dev, indio_dev,\ndrivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c-348-\t\t\t\t\tNULL, trigger_capture, NULL);\n--\ndrivers/iio/dac/ad3552r.c=616=static int ad3552r_probe(struct spi_device *spi)\n--\ndrivers/iio/dac/ad3552r.c-645-\ndrivers/iio/dac/ad3552r.c:646:\terr = devm_iio_triggered_buffer_setup_ext(\u0026indio_dev-\u003edev, indio_dev, NULL,\ndrivers/iio/dac/ad3552r.c-647-\t\t\t\t\t\t \u0026ad3552r_trigger_handler,\n--\ndrivers/iio/dac/ad5766.c=601=static int ad5766_probe(struct spi_device *spi)\n--\ndrivers/iio/dac/ad5766.c-634-\t/* Configure trigger buffer */\ndrivers/iio/dac/ad5766.c:635:\tret = devm_iio_triggered_buffer_setup_ext(\u0026spi-\u003edev, indio_dev, NULL,\ndrivers/iio/dac/ad5766.c-636-\t\t\t\t\t\t ad5766_trigger_handler,\n--\ndrivers/iio/gyro/adxrs290.c=616=static int adxrs290_probe(struct spi_device *spi)\n--\ndrivers/iio/gyro/adxrs290.c-674-\ndrivers/iio/gyro/adxrs290.c:675:\tret = devm_iio_triggered_buffer_setup(\u0026spi-\u003edev, indio_dev,\ndrivers/iio/gyro/adxrs290.c-676-\t\t\t\t\t \u0026iio_pollfunc_store_time,\n--\ndrivers/iio/gyro/fxas21002c_core.c=924=int fxas21002c_core_probe(struct device *dev, struct regmap *regmap, int irq,\n--\ndrivers/iio/gyro/fxas21002c_core.c-979-\ndrivers/iio/gyro/fxas21002c_core.c:980:\tret = devm_iio_triggered_buffer_setup(dev, indio_dev, NULL,\ndrivers/iio/gyro/fxas21002c_core.c-981-\t\t\t\t\t fxas21002c_trigger_handler, NULL);\n--\ndrivers/iio/gyro/st_gyro_buffer.c=61=int st_gyro_allocate_ring(struct iio_dev *indio_dev)\ndrivers/iio/gyro/st_gyro_buffer.c-62-{\ndrivers/iio/gyro/st_gyro_buffer.c:63:\treturn devm_iio_triggered_buffer_setup(indio_dev-\u003edev.parent, indio_dev,\ndrivers/iio/gyro/st_gyro_buffer.c-64-\t\tNULL, \u0026st_sensors_trigger_handler, \u0026st_gyro_buffer_setup_ops);\n--\ndrivers/iio/health/afe4403.c=459=static int afe4403_probe(struct spi_device *spi)\n--\ndrivers/iio/health/afe4403.c-552-\ndrivers/iio/health/afe4403.c:553:\tret = devm_iio_triggered_buffer_setup(dev, indio_dev,\ndrivers/iio/health/afe4403.c-554-\t\t\t\t\t \u0026iio_pollfunc_store_time,\n--\ndrivers/iio/health/afe4404.c=467=static int afe4404_probe(struct i2c_client *client)\n--\ndrivers/iio/health/afe4404.c-559-\ndrivers/iio/health/afe4404.c:560:\tret = devm_iio_triggered_buffer_setup(dev, indio_dev,\ndrivers/iio/health/afe4404.c-561-\t\t\t\t\t \u0026iio_pollfunc_store_time,\n--\ndrivers/iio/humidity/am2315.c=220=static int am2315_probe(struct i2c_client *client)\n--\ndrivers/iio/humidity/am2315.c-240-\ndrivers/iio/humidity/am2315.c:241:\tret = devm_iio_triggered_buffer_setup(\u0026client-\u003edev,\ndrivers/iio/humidity/am2315.c-242-\t\t\t\t\tindio_dev, iio_pollfunc_store_time,\n--\ndrivers/iio/humidity/hdc100x.c=338=static int hdc100x_probe(struct i2c_client *client)\n--\ndrivers/iio/humidity/hdc100x.c-369-\ndrivers/iio/humidity/hdc100x.c:370:\tret = devm_iio_triggered_buffer_setup(\u0026client-\u003edev,\ndrivers/iio/humidity/hdc100x.c-371-\t\t\t\t\t indio_dev, NULL,\n--\ndrivers/iio/humidity/hts221_buffer.c=194=int hts221_allocate_buffers(struct iio_dev *iio_dev)\n--\ndrivers/iio/humidity/hts221_buffer.c-196-\tstruct hts221_hw *hw = iio_priv(iio_dev);\ndrivers/iio/humidity/hts221_buffer.c:197:\treturn devm_iio_triggered_buffer_setup(hw-\u003edev, iio_dev,\ndrivers/iio/humidity/hts221_buffer.c-198-\t\t\t\t\tNULL, hts221_buffer_handler_thread,\n--\ndrivers/iio/imu/adis_buffer.c=194=devm_adis_setup_buffer_and_trigger_with_attrs(struct adis *adis, struct iio_dev *indio_dev,\n--\ndrivers/iio/imu/adis_buffer.c-203-\ndrivers/iio/imu/adis_buffer.c:204:\tret = devm_iio_triggered_buffer_setup_ext(\u0026adis-\u003espi-\u003edev, indio_dev,\ndrivers/iio/imu/adis_buffer.c-205-\t\t\t\t\t\t \u0026iio_pollfunc_store_time,\n--\ndrivers/iio/imu/bmi160/bmi160_core.c=823=int bmi160_core_probe(struct device *dev, struct regmap *regmap,\n--\ndrivers/iio/imu/bmi160/bmi160_core.c-867-\ndrivers/iio/imu/bmi160/bmi160_core.c:868:\tret = devm_iio_triggered_buffer_setup(dev, indio_dev,\ndrivers/iio/imu/bmi160/bmi160_core.c-869-\t\t\t\t\t iio_pollfunc_store_time,\n--\ndrivers/iio/imu/bmi270/bmi270_core.c=1599=int bmi270_core_probe(struct device *dev, struct regmap *regmap,\n--\ndrivers/iio/imu/bmi270/bmi270_core.c-1632-\ndrivers/iio/imu/bmi270/bmi270_core.c:1633:\tret = devm_iio_triggered_buffer_setup(dev, indio_dev,\ndrivers/iio/imu/bmi270/bmi270_core.c-1634-\t\t\t\t\t iio_pollfunc_store_time,\n--\ndrivers/iio/imu/bmi323/bmi323_core.c=2100=int bmi323_core_probe(struct device *dev)\n--\ndrivers/iio/imu/bmi323/bmi323_core.c-2153-\ndrivers/iio/imu/bmi323/bmi323_core.c:2154:\tret = devm_iio_triggered_buffer_setup_ext(data-\u003edev, indio_dev,\ndrivers/iio/imu/bmi323/bmi323_core.c-2155-\t\t\t\t\t\t \u0026iio_pollfunc_store_time,\n--\ndrivers/iio/imu/bno055/bno055.c=1559=int bno055_probe(struct device *dev, struct regmap *regmap,\n--\ndrivers/iio/imu/bno055/bno055.c-1673-\ndrivers/iio/imu/bno055/bno055.c:1674:\tret = devm_iio_triggered_buffer_setup(dev, iio_dev,\ndrivers/iio/imu/bno055/bno055.c-1675-\t\t\t\t\t iio_pollfunc_store_time,\n--\ndrivers/iio/imu/inv_mpu6050/inv_mpu_core.c=1882=int inv_mpu_core_probe(struct regmap *regmap, int irq, const char *name,\n--\ndrivers/iio/imu/inv_mpu6050/inv_mpu_core.c-2090-\t\t */\ndrivers/iio/imu/inv_mpu6050/inv_mpu_core.c:2091:\t\tresult = devm_iio_triggered_buffer_setup(dev, indio_dev,\ndrivers/iio/imu/inv_mpu6050/inv_mpu_core.c-2092-\t\t\t\t\t\t\t iio_pollfunc_store_time,\n--\ndrivers/iio/imu/smi240.c=540=static int smi240_probe(struct spi_device *spi)\n--\ndrivers/iio/imu/smi240.c-580-\ndrivers/iio/imu/smi240.c:581:\tret = devm_iio_triggered_buffer_setup(dev, indio_dev,\ndrivers/iio/imu/smi240.c-582-\t\t\t\t\t iio_pollfunc_store_time,\n--\n\n"
} |
| 27/2 | 2026/09/18 08:06 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 45737 output: 43 thoughts: 21 Thoughts: Here's a summary of my thought process: **Diving into the IIO Triggered Buffer Implementation** Okay, time to get my hands dirty. I need to understand how triggered buffering works in the industrial I/O subsystem. My first instinct, given my experience, is to head directly for the core implementation. Let's start by examining the `drivers/iio/buffer/industrialio-triggered-buffer.c` file. This is where the heavy lifting should be done, the heart of the triggered buffer functionality. I expect to find the central data structures, the interrupt handling logic, and the mechanisms for data transfer between the hardware and the kernel buffer. I'll be looking for how the triggers are configured, how the buffer is allocated and managed, and how the data is ultimately exposed to user space. It should give a great idea as to how the IIO buffer system is designed, especially in the triggered case. |
| 28/2 | 2026/09/18 08:06 | tool | read-file |
0mArgs:{
"File": "drivers/iio/buffer/industrialio-triggered-buffer.c",
"FirstLine": 100,
"LineCount": 40
}Results: {
"Contents": " 100:\t\n 101:\t/**\n 102:\t * iio_triggered_buffer_cleanup() - Free resources allocated by iio_triggered_buffer_setup_ext()\n 103:\t * @indio_dev: IIO device structure\n 104:\t */\n 105:\tvoid iio_triggered_buffer_cleanup(struct iio_dev *indio_dev)\n 106:\t{\n 107:\t\tiio_dealloc_pollfunc(indio_dev-\u003epollfunc);\n 108:\t\tiio_kfifo_free(indio_dev-\u003ebuffer);\n 109:\t}\n 110:\tEXPORT_SYMBOL(iio_triggered_buffer_cleanup);\n 111:\t\n 112:\tstatic void devm_iio_triggered_buffer_clean(void *indio_dev)\n 113:\t{\n 114:\t\tiio_triggered_buffer_cleanup(indio_dev);\n 115:\t}\n 116:\t\n 117:\tint devm_iio_triggered_buffer_setup_ext(struct device *dev,\n 118:\t\t\t\t\t\tstruct iio_dev *indio_dev,\n 119:\t\t\t\t\t\tirqreturn_t (*h)(int irq, void *p),\n 120:\t\t\t\t\t\tirqreturn_t (*thread)(int irq, void *p),\n 121:\t\t\t\t\t\tenum iio_buffer_direction direction,\n 122:\t\t\t\t\t\tconst struct iio_buffer_setup_ops *ops,\n 123:\t\t\t\t\t\tconst struct iio_dev_attr **buffer_attrs)\n 124:\t{\n 125:\t\tint ret;\n 126:\t\n 127:\t\tret = iio_triggered_buffer_setup_ext(indio_dev, h, thread, direction,\n 128:\t\t\t\t\t\t ops, buffer_attrs);\n 129:\t\tif (ret)\n 130:\t\t\treturn ret;\n 131:\t\n 132:\t\treturn devm_add_action_or_reset(dev, devm_iio_triggered_buffer_clean,\n 133:\t\t\t\t\t\tindio_dev);\n 134:\t}\n 135:\tEXPORT_SYMBOL_GPL(devm_iio_triggered_buffer_setup_ext);\n 136:\t\n 137:\tMODULE_AUTHOR(\"Lars-Peter Clausen \u003clars@metafoo.de\u003e\");\n 138:\tMODULE_DESCRIPTION(\"IIO helper functions for setting up triggered buffers\");\n 139:\tMODULE_LICENSE(\"GPL\");\n"
} |
| 29/2 | 2026/09/18 08:06 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 46663 output: 42 thoughts: 26 Thoughts: Here's my attempt at summarizing the thought process, tailored for an expert audience: **Analyzing `iio_triggered_buffer_setup_ext`** Okay, so I'm diving into `iio_triggered_buffer_setup_ext`. The name itself is fairly descriptive, but I'm going to quickly refresh my understanding of its role within the broader Industrial I/O (IIO) framework. My primary concern is what the `_ext` suffix implies, as it may signal that this function is an extended version of another. I’ll be checking its functionality to understand how it differs, and what additional parameters or behaviors are introduced in contrast to its non-extended counterpart. I want to see how this function handles the complexities of triggered buffer setups, particularly any nuances in how it integrates with external trigger sources and any implications for data flow, synchronization, or error handling. Essentially, I need to know the 'what' and the 'why' of its existence to judge its efficacy within a system. |
| 30/2 | 2026/09/18 08:06 | tool | read-file |
0mArgs:{
"File": "drivers/iio/buffer/industrialio-triggered-buffer.c",
"FirstLine": 40,
"LineCount": 60
}Results: {
"Contents": " 40:\t\tirqreturn_t (*h)(int irq, void *p),\n 41:\t\tirqreturn_t (*thread)(int irq, void *p),\n 42:\t\tenum iio_buffer_direction direction,\n 43:\t\tconst struct iio_buffer_setup_ops *setup_ops,\n 44:\t\tconst struct iio_dev_attr **buffer_attrs)\n 45:\t{\n 46:\t\tstruct iio_buffer *buffer;\n 47:\t\tint ret;\n 48:\t\n 49:\t\t/*\n 50:\t\t * iio_triggered_buffer_cleanup() assumes that the buffer allocated here\n 51:\t\t * is assigned to indio_dev-\u003ebuffer but this is only the case if this\n 52:\t\t * function is the first caller to iio_device_attach_buffer(). If\n 53:\t\t * indio_dev-\u003ebuffer is already set then we can't proceed otherwise the\n 54:\t\t * cleanup function will try to free a buffer that was not allocated here.\n 55:\t\t */\n 56:\t\tif (indio_dev-\u003ebuffer)\n 57:\t\t\treturn -EADDRINUSE;\n 58:\t\n 59:\t\tbuffer = iio_kfifo_allocate();\n 60:\t\tif (!buffer) {\n 61:\t\t\tret = -ENOMEM;\n 62:\t\t\tgoto error_ret;\n 63:\t\t}\n 64:\t\n 65:\t\tindio_dev-\u003epollfunc = iio_alloc_pollfunc(h,\n 66:\t\t\t\t\t\t\t thread,\n 67:\t\t\t\t\t\t\t IRQF_ONESHOT,\n 68:\t\t\t\t\t\t\t indio_dev,\n 69:\t\t\t\t\t\t\t \"%s_consumer%d\",\n 70:\t\t\t\t\t\t\t indio_dev-\u003ename,\n 71:\t\t\t\t\t\t\t iio_device_id(indio_dev));\n 72:\t\tif (indio_dev-\u003epollfunc == NULL) {\n 73:\t\t\tret = -ENOMEM;\n 74:\t\t\tgoto error_kfifo_free;\n 75:\t\t}\n 76:\t\n 77:\t\t/* Ring buffer functions - here trigger setup related */\n 78:\t\tindio_dev-\u003esetup_ops = setup_ops;\n 79:\t\n 80:\t\t/* Flag that polled ring buffering is possible */\n 81:\t\tindio_dev-\u003emodes |= INDIO_BUFFER_TRIGGERED;\n 82:\t\n 83:\t\tbuffer-\u003edirection = direction;\n 84:\t\tbuffer-\u003eattrs = buffer_attrs;\n 85:\t\n 86:\t\tret = iio_device_attach_buffer(indio_dev, buffer);\n 87:\t\tif (ret \u003c 0)\n 88:\t\t\tgoto error_dealloc_pollfunc;\n 89:\t\n 90:\t\treturn 0;\n 91:\t\n 92:\terror_dealloc_pollfunc:\n 93:\t\tiio_dealloc_pollfunc(indio_dev-\u003epollfunc);\n 94:\terror_kfifo_free:\n 95:\t\tiio_kfifo_free(buffer);\n 96:\terror_ret:\n 97:\t\treturn ret;\n 98:\t}\n 99:\tEXPORT_SYMBOL(iio_triggered_buffer_setup_ext);\n"
} |
| 31/2 | 2026/09/18 08:06 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 47776 output: 34 thoughts: 76 Thoughts: Here's my thinking process: **Diving Deep into the `indio_dev->trig` Lifecycle** Okay, so I'm staring at this snippet related to `indio_dev->trig`, and my immediate thought is: "Where exactly does this fit in the grand scheme of things?" Specifically, when I see `indio_dev->trig = iio_trigger_get(data->trig);` get executed, alarm bells start ringing. I understand that `iio_trigger_get()` likely increases the reference count, but that's just the *get* part! My concern isn't about the *getting*, my primary focus is the *releasing*. The burning question is: *Where* and *how* is `indio_dev->trig` handled after it's acquired? Where in the kernel is it eventually released, and how do we ensure there are no memory leaks or reference count problems? I need to trace its journey. I need to know *everywhere* this pointer is touched. I'm going to start by scouring the kernel source, searching for all instances where `indio_dev->trig` is *put*, *released*, or otherwise modified. It's a classic resource management issue, and I need to be absolutely certain it's handled correctly to prevent any instability in the system. Let's dig in and follow its usage! |
| 32/2 | 2026/09/18 08:06 | tool | grepper |
0mArgs:{
"Expression": "iio_trigger_put\\(.*trig",
"PathPrefix": "drivers/iio"
}Results: {
"Output": "drivers/iio/industrialio-trigger.c=438=static ssize_t current_trigger_store(struct device *dev,\n--\ndrivers/iio/industrialio-trigger.c-478-\t\t\t\t\t\t indio_dev-\u003epollfunc_event);\ndrivers/iio/industrialio-trigger.c:479:\t\tiio_trigger_put(oldtrig);\ndrivers/iio/industrialio-trigger.c-480-\t}\n--\ndrivers/iio/industrialio-trigger.c-490-\tif (trig)\ndrivers/iio/industrialio-trigger.c:491:\t\tiio_trigger_put(trig);\ndrivers/iio/industrialio-trigger.c-492-\treturn ret;\n--\ndrivers/iio/industrialio-trigger.c=765=void iio_device_unregister_trigger_consumer(struct iio_dev *indio_dev)\n--\ndrivers/iio/industrialio-trigger.c-768-\tif (indio_dev-\u003etrig)\ndrivers/iio/industrialio-trigger.c:769:\t\tiio_trigger_put(indio_dev-\u003etrig);\ndrivers/iio/industrialio-trigger.c-770-}\n"
} |
| 33/2 | 2026/09/18 08:06 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 48504 output: 35 thoughts: 1468 Thoughts: **Analysis of a Trigger Consumer Reference Leak and Reachability in `vl53l0x-i2c`** Okay, so I've been digging into this potential reference leak within the `vl53l0x-i2c` driver, specifically around trigger consumers. I've pinpointed a possible issue in how the `indio_dev->trig` reference is managed during device release, and I've looked at the relevant code in `iio_device_unregister_trigger_consumer`, `iio_dev_release`, and `iio_triggered_buffer_setup_ext`. The core of the problem seems to be that if the `iio_trigger_get` call happens *before* `devm_iio_triggered_buffer_setup`, and those subsequent setup calls fail, then the `indio_dev->modes & INDIO_ALL_TRIGGERED_MODES` flag is never set. Consequently, `iio_dev_release` would skip calling `iio_device_unregister_trigger_consumer` which is meant to release the trigger. That leaves `indio_dev->trig` with a leaked reference. Moving the `iio_trigger_get` call after `devm_iio_triggered_buffer_setup` solves the leak. Now, the critical question is whether this code path is *reachable* by fuzzing. I'm thinking about Syzkaller here. My understanding is that reachability is the primary gatekeeper for fuzzing applicability. I'm focusing on the criteria: "REACHABILITY IS THE PRIMARY GATE". I need to determine if this code, particularly the vulnerable path I've just identified, can be executed within a standard QEMU environment, which is where Syzkaller operates. First, I have to figure out if the `vl53l0x-i2c` driver, which is a driver for a proximity sensor, is accessible to Syzkaller. I've got a couple of key questions. First, does QEMU emulate a VL53L0X device? No, it doesn't. That's a negative. Second, can Syzkaller instantiate I2C devices? The answer to that is, yes, it can, potentially, through pseudo-syscalls or syscalls manipulating `/sys/bus/i2c/devices/i2c-*/new_device`. I’m looking at the `vl53l0x_probe` function. I see that `vl53l0x_probe` uses `i2c_smbus_read_byte_data` to check the device's model ID, and critically, there is an `if (client->irq)` check. So what is the situation? Let's say I write "vl53l0x 0x29" to `/sys/bus/i2c/devices/i2c-0/new_device`. What happens in a standard QEMU setup on, say, an x86_64 pc or q35 machine? The standard I2C adapter is usually `i801_smbus` (Intel SMBus). If Syzkaller sends an I2C transaction to address 0x29 on `i801_smbus`, there's no device there, so the `i2c_smbus_read_byte_data` will return an error (`-ENXIO`), and `vl53l0x_probe` immediately returns an error, specifically `-EINVAL`. It *never* gets past that initial read. It never even reaches the `if (client->irq)` block. Furthermore, even IF the I2C read were to succeed (which it cannot), I need to check where the `client->irq` value comes from when instantiating via `new_device`. I need to examine how `i2c_sysfs_new_device` sets up `client->irq`. |
| 34/2 | 2026/09/18 08:07 | tool | grepper |
0mArgs:{
"Expression": "i2c_sysfs_new_device",
"PathPrefix": "drivers/i2c"
}Results: {
"Output": "drivers/i2c/i2c-core-base.c=1320=static DEVICE_ATTR_WO(new_device);\n--\ndrivers/i2c/i2c-core-base.c-1324- * they got it wrong. This interface can only be used to delete devices\ndrivers/i2c/i2c-core-base.c:1325: * instantiated by i2c_sysfs_new_device above. This guarantees that we\ndrivers/i2c/i2c-core-base.c-1326- * don't delete devices to which some kernel code still has references.\n"
} |
| 35/2 | 2026/09/18 08:07 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 51026 output: 44 thoughts: 28 Thoughts: Okay, let's dive into this. I'm going to grab `drivers/i2c/i2c-core-base.c` and zero in on the area around line 1300. I know this code, the I2C core base, is fundamental, so I need to understand what's happening there to keep current. I'm expecting to find something interesting, maybe a critical section related to bus arbitration or device handling, a new feature, or perhaps a tricky bug fix. I'll read with a critical eye, looking for details that might indicate performance bottlenecks or potential race conditions. I'm going to pay extra attention to any calls to other functions and how those functions might interact with the current one to see how the whole system works. My goal is a full understanding of the operation of this portion of the I2C core, and how it fits into the overall scheme. |
| 36/2 | 2026/09/18 08:07 | tool | read-file |
0mArgs:{
"File": "drivers/i2c/i2c-core-base.c",
"FirstLine": 1290,
"LineCount": 40
}Results: {
"Contents": "1290:\t\t\treturn -EINVAL;\n1291:\t\t}\n1292:\t\tif (res \u003e 1 \u0026\u0026 end != '\\n') {\n1293:\t\t\tdev_err(dev, \"%s: Extra parameters\\n\", \"new_device\");\n1294:\t\t\treturn -EINVAL;\n1295:\t\t}\n1296:\t\n1297:\t\tif ((info.addr \u0026 I2C_ADDR_OFFSET_TEN_BIT) == I2C_ADDR_OFFSET_TEN_BIT) {\n1298:\t\t\tinfo.addr \u0026= ~I2C_ADDR_OFFSET_TEN_BIT;\n1299:\t\t\tinfo.flags |= I2C_CLIENT_TEN;\n1300:\t\t}\n1301:\t\n1302:\t\tif (info.addr \u0026 I2C_ADDR_OFFSET_SLAVE) {\n1303:\t\t\tinfo.addr \u0026= ~I2C_ADDR_OFFSET_SLAVE;\n1304:\t\t\tinfo.flags |= I2C_CLIENT_SLAVE;\n1305:\t\t}\n1306:\t\n1307:\t\tclient = i2c_new_client_device(adap, \u0026info);\n1308:\t\tif (IS_ERR(client))\n1309:\t\t\treturn PTR_ERR(client);\n1310:\t\n1311:\t\t/* Keep track of the added device */\n1312:\t\tmutex_lock(\u0026adap-\u003euserspace_clients_lock);\n1313:\t\tlist_add_tail(\u0026client-\u003edetected, \u0026adap-\u003euserspace_clients);\n1314:\t\tmutex_unlock(\u0026adap-\u003euserspace_clients_lock);\n1315:\t\tdev_info(dev, \"%s: Instantiated device %s at 0x%02hx\\n\", \"new_device\",\n1316:\t\t\t info.type, info.addr);\n1317:\t\n1318:\t\treturn count;\n1319:\t}\n1320:\tstatic DEVICE_ATTR_WO(new_device);\n1321:\t\n1322:\t/*\n1323:\t * And of course let the users delete the devices they instantiated, if\n1324:\t * they got it wrong. This interface can only be used to delete devices\n1325:\t * instantiated by i2c_sysfs_new_device above. This guarantees that we\n1326:\t * don't delete devices to which some kernel code still has references.\n1327:\t *\n1328:\t * Parameter checking may look overzealous, but we really don't want\n1329:\t * the user to delete the wrong device.\n"
} |
| 37/2 | 2026/09/18 08:07 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 51963 output: 37 thoughts: 813 Thoughts: **Unreachable Code Analysis: VL53L0X I2C Driver**
Okay, let's break this down. The code in `new_device` is parsing `info`, and `info.irq` is zero. That means the `client->irq` value within the driver is initialized to zero when the driver instantiates from `new_device`, which is not parsed from userspace input. With `client->irq` set to zero, the crucial conditional `if (client->irq) { ... }` will never execute. That means there's no way this modified code path can be reached at all, right?
But, wait, what about ACPI or Device Tree? Could the interrupt be coming from there? In the QEMU/GCE x86_64 environments we use, there's no ACPI table or Device Tree entry declaring a VL53L0X sensor with an IRQ. This sensor is a physical I2C device commonly used on embedded boards, smartphones, and robotic platforms. It relies on the hardware itself, or at least a board DTS/ACPI setup representing a real or emulated I2C sensor. That's a key point. This hardware isn't present in our standard fuzzing environments.
Let's revisit the negative criteria for fuzzing. The text mentions "Structurally unreachable hardware," specifically vendor-specific PCIe switches, SmartNICs, GPU drivers (like mlxsw, pds_core, qed, ionic, amdgpu) that need physical ASIC/PCIe cards. This makes me think about similar drivers in syzkaller.
The core principle: Reachability is the primary gate. We can *only* discover bugs in code that *can* execute in our virtualized environments. If the code is structurally unreachable, we should *not* fuzz it, regardless of whether it adds assertions or complex logic.
Okay, is the `vl53l0x-i2c.c` driver structurally unreachable? Absolutely. It's a driver for the STMicroelectronics VL53L0X ToF range finder, which interfaces over I2C and uses an interrupt line. We need the physical VL53L0X hardware connected over I2C, and we need the interrupt to actually fire. It's not emulated in QEMU, and there's no path to it using software emulated devices like virtio, USB gadget, loopback, or netlink.
Could a USB gadget emulate an I2C device *with* an interrupt? No. USB gadget typically emulates USB devices. Even if we connected a USB-to-I2C adapter like the CP2112, that adapter doesn't automatically attach arbitrary I2C chips. We'd have to configure it via sysfs or Device Tree/ACPI. But we already established that: 1) `new_device` sets `client->irq = 0`. 2) We'd need to actually probe the VL53L0X hardware by communicating with a specific register (`VL_REG_IDENTIFICATION_MODEL_ID` at address 0xc0) to confirm its existence; the expected value is `0xee`, and this communication does not exist. 3) The CP2112 doesn't have an IIO VL53L0X attached to it. The entire `vl53l0x_probe` function, specifically the modified section within the `if (client->irq)` block, is completely inaccessible in our standard virtualized setup.
Now, a final check. Is `CONFIG_VL53L0X_I2C` even enabled in the syzkaller or defconfig? We should verify this in the x86_64 defconfig or configurations to be absolutely sure.
|
| 38/2 | 2026/09/18 08:07 | tool | grepper |
0mError:no matches Args: {
"Expression": "CONFIG_VL53L0X_I2C",
"PathPrefix": "arch/x86"
}Results: {
"error": "no matches"
} |
| 39/2 | 2026/09/18 08:07 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 53635 output: 121 thoughts: 628 Thoughts: **My Assessment of the Fuzzing Worthiness** Okay, so this change isn't even enabled in the `arch/x86` configurations, that's the first clue. Let's see about `WorthFuzzing`. Based on the context, I expect this to evaluate to `false`. Time to double-check my assumptions and rationale. If `WorthFuzzing` is `false`, then the expectations are: * `WorthFuzzing`: `false` * `FocusSymbols`: should be an empty array (`[]`) * `EnableConfigs`: also an empty array (`[]`) * `Reasoning`: Concise explanation for why fuzzing isn't valuable. Wait a second, are `EnableConfigs` and `FocusSymbols` supposed to be empty when `WorthFuzzing` is false? Let's consult the schema for `set-results` to confirm. Yep, the schema confirms that `EnableConfigs` and `FocusSymbols` are expected to be empty when `WorthFuzzing` is false. The schema defines: * `EnableConfigs`: Kernel config flags required without CONFIG\_ prefix. items: string, nullable: true. * `FocusSymbols`: Specific, non-ubiquitous kernel functions to focus fuzzing on. items: string, nullable: true. * `Reasoning`: Concise explanation of the fuzzing verdict. * `WorthFuzzing`: True if changes modify reachable code worth fuzzing. Typically, when `WorthFuzzing` is false, I see both `FocusSymbols` and `EnableConfigs` being empty arrays, like `[]`. Okay, let's verify if anything else is modified in this patch that may alter this decision. Looks like only `drivers/iio/proximity/vl53l0x-i2c.c` is touched. The patch moves `indio_dev->trig = iio_trigger_get(data->trig);` from before `vl53l0x_configure_irq()` to after `devm_iio_triggered_buffer_setup()` in `vl53l0x_probe()`. Now, let's go over the negative criteria, just to make absolutely sure: * Structurally unreachable hardware: This is the crux of it. We're talking about drivers for hardware that isn't easily emulated in standard QEMU or GCE fuzzing environments. Specifically vendors that require specific hardware like PCIe switches, SmartNICs, or GPU drivers (like mlxsw, pds_core, qed, ionic, amdgpu). In this case, the STMicroelectronics VL53L0X is a dedicated I2C Time-of-Flight ranging sensor requiring physical hardware not emulated in standard QEMU/GCE fuzzing environments. The changed code lies within the driver probe routine, under an IRQ-specific branch, which cannot be reached in virtualized fuzzing setups. Therefore, the verdict is `WorthFuzzing` is `false`. Now, time to formulate the call to `set-results`: * `WorthFuzzing`: `false` * `FocusSymbols`: `[]` * `EnableConfigs`: `[]` * `Reasoning`: "The patch modifies `vl53l0x_probe()` in `drivers/iio/proximity/vl53l0x-i2c.c`, moving the trigger reference assignment. The VL53L0X is a physical I2C Time-of-Flight ranging sensor requiring dedicated hardware that is not emulated in standard virtualized environments (QEMU/GCE), making the modified code structurally unreachable." Let's get this done. |
| 40/2 | 2026/09/18 08:07 | tool | set-results |
0mArgs:{
"EnableConfigs": [],
"FocusSymbols": [],
"Reasoning": "The patch modifies the probe routine of the STMicroelectronics VL53L0X Time-of-Flight distance sensor driver (drivers/iio/proximity/vl53l0x-i2c.c), reordering the trigger reference assignment under an IRQ check. This driver controls physical I2C sensor hardware that is not emulated in standard QEMU/GCE fuzzing environments, making the modified code structurally unreachable.",
"WorthFuzzing": false
}Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"Reasoning": "The patch modifies the probe routine of the STMicroelectronics VL53L0X Time-of-Flight distance sensor driver (drivers/iio/proximity/vl53l0x-i2c.c), reordering the trigger reference assignment under an IRQ check. This driver controls physical I2C sensor hardware that is not emulated in standard QEMU/GCE fuzzing environments, making the modified code structurally unreachable.",
"WorthFuzzing": false
} |
| 41/1 | 2026/09/18 08:07 | action | If |
0mArgs:{
"WorthFuzzing": false
}Results: null |
| Total Calls | Total Tokens | Avg Tokens | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|
| Total Calls | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|