diff options
| author | Arnd Bergmann <arnd@arndb.de> | 2026-08-10 09:48:27 +0200 |
|---|---|---|
| committer | Arnd Bergmann <arnd@arndb.de> | 2026-08-10 09:48:29 +0200 |
| commit | 253ea5efea2776df201732701754f32d2c721b6f (patch) | |
| tree | 3ad77293d26a03828fbb2ee5c69c8e6ed3b7ec6f | |
| parent | 6a05421154285888f7bc5d2510e3a9bc1ce31652 (diff) | |
| parent | dce7afe3efe485a99200a59dc78738539cbd133f (diff) | |
Merge tag 'ti-driver-soc-for-v7.3' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux into soc/drivers
TI SoC driver updates for v7.3
Minor bug fixes and cleanups across TI SoC and firmware drivers:
- firmware: ti_sci: Fix a resource leak by undoing list publication when
device populate fails, ensuring proper cleanup on error paths
- soc: ti: knav_qmss: Remove debugfs file on teardown to avoid stale
entries and potential use-after-free scenarios
- soc: ti: wkup_m3_ipc: Remove redundant dev_err() call to avoid
duplicate error reporting
* tag 'ti-driver-soc-for-v7.3' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux:
soc: ti: wkup_m3_ipc: Remove redundant dev_err()
soc: ti: knav_qmss: Remove debugfs file on teardown
firmware: ti_sci: Undo list publication on populate failure
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
| -rw-r--r-- | drivers/firmware/ti_sci.c | 4 | ||||
| -rw-r--r-- | drivers/soc/ti/knav_qmss.h | 1 | ||||
| -rw-r--r-- | drivers/soc/ti/knav_qmss_queue.c | 7 | ||||
| -rw-r--r-- | drivers/soc/ti/wkup_m3_ipc.c | 4 |
4 files changed, 11 insertions, 5 deletions
diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c index 590a464403c5..cc747ab0237f 100644 --- a/drivers/firmware/ti_sci.c +++ b/drivers/firmware/ti_sci.c @@ -4225,6 +4225,10 @@ static int ti_sci_probe(struct platform_device *pdev) ret = of_platform_populate(dev->of_node, NULL, NULL, dev); if (ret) { dev_err(dev, "platform_populate failed %pe\n", ERR_PTR(ret)); + of_platform_depopulate(dev); + mutex_lock(&ti_sci_list_mutex); + list_del(&info->node); + mutex_unlock(&ti_sci_list_mutex); goto out; } return 0; diff --git a/drivers/soc/ti/knav_qmss.h b/drivers/soc/ti/knav_qmss.h index 037dc1b36645..8a624fbda84a 100644 --- a/drivers/soc/ti/knav_qmss.h +++ b/drivers/soc/ti/knav_qmss.h @@ -304,6 +304,7 @@ struct knav_device { struct list_head pools; struct list_head pdsps; struct list_head qmgrs; + struct dentry *debugfs_file; enum qmss_version version; }; diff --git a/drivers/soc/ti/knav_qmss_queue.c b/drivers/soc/ti/knav_qmss_queue.c index 7410b63af0e6..3e4041454f69 100644 --- a/drivers/soc/ti/knav_qmss_queue.c +++ b/drivers/soc/ti/knav_qmss_queue.c @@ -1849,8 +1849,9 @@ static int knav_queue_probe(struct platform_device *pdev) goto err; } - debugfs_create_file("qmss", S_IFREG | S_IRUGO, NULL, NULL, - &knav_queue_debug_fops); + knav_qdev->debugfs_file = + debugfs_create_file("qmss", 0444, NULL, NULL, + &knav_queue_debug_fops); device_ready = true; return 0; @@ -1868,6 +1869,8 @@ static void knav_queue_remove(struct platform_device *pdev) struct knav_device *kdev = platform_get_drvdata(pdev); device_ready = false; + debugfs_remove(kdev->debugfs_file); + kdev->debugfs_file = NULL; knav_queue_stop_pdsps(kdev); knav_queue_free_regions(kdev); knav_free_queue_ranges(kdev); diff --git a/drivers/soc/ti/wkup_m3_ipc.c b/drivers/soc/ti/wkup_m3_ipc.c index 5845fc652adc..f8640cdc2a21 100644 --- a/drivers/soc/ti/wkup_m3_ipc.c +++ b/drivers/soc/ti/wkup_m3_ipc.c @@ -630,10 +630,8 @@ static int wkup_m3_ipc_probe(struct platform_device *pdev) ret = devm_request_irq(dev, irq, wkup_m3_txev_handler, 0, "wkup_m3_txev", m3_ipc); - if (ret) { - dev_err(dev, "request_irq failed\n"); + if (ret) return ret; - } m3_ipc->mbox_client.dev = dev; m3_ipc->mbox_client.tx_done = NULL; |
