Re: [PATCH 7/8] mfd: twl-core: make reg_write callback take const void *
[email protected] Wed, 15 Jul 2026 18:08:54 +0000
| Newsgroups | org.infradead.lists.linux-amlogic,dev.linux.lists.imx,dev.linux.lists.linux-sunxi,dev.linux.lists.mfd,org.kernel.vger.linux-rtc |
|---|---|
| Message-ID | <[email protected]> |
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider: New issues: - [Low] The commit message description is not capitalized, violating MFD subsystem guidelines. Pre-existing issues: - [High] Probe failure during MFD device registration skips manual resource cleanup, causing resource leaks. -- --- Patch [7]: [PATCH 7/8] mfd: twl-core: make reg_write callback take const void * --- commit 5525fd3bfa73424e942892bd1e1fb2d2e9554159 Author: Link Mauve <[email protected]> mfd: twl-core: make reg_write callback take const void * This commit updates the reg_write callback to use a const void pointer for its data argument. It fixes all users of the nvmem_config API to accommodate this change. > mfd: twl-core: make reg_write callback take const void * [Severity: Low] This isn't a bug, but should the description after the subsystem prefix be capitalized (i.e., "Make reg_write...") to match the MFD subsystem guidelines? [Severity: High] This is a pre-existing issue, but I noticed a potential resource leak in twl_probe(). If devm_mfd_add_devices() fails, the code jumps directly to the 'free' label, skipping the 'fail' label: drivers/mfd/twl-core.c:twl_probe() { ... status = devm_mfd_add_devices(&client->dev, PLATFORM_DEVID_NONE, cells, num_cells, NULL, 0, NULL); if (status < 0) goto free; ... fail: if (status < 0) twl_remove(client); free: if (status < 0) platform_device_unregister(pdev); ... } Does this bypass leak manually requested IRQ domains and unmanaged dummy I2C devices by skipping twl_remove()? -- Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=7 _______________________________________________ linux-amlogic mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-amlogic