Skip to content

Commit 71712cf

Browse files
Wentao-Liangkuba-moo
authored andcommitted
drivers: net: ionic: add missed debugfs cleanup to ionic_probe() error path
The ionic_setup_one() creates a debugfs entry for ionic upon successful execution. However, the ionic_probe() does not release the dentry before returning, resulting in a memory leak. To fix this bug, we add the ionic_debugfs_del_dev() to release the resources in a timely manner before returning. Fixes: 0de38d9 ("ionic: extract common bits from ionic_probe") Signed-off-by: Wentao Liang <Wentao_liang_g@163.com> Acked-by: Shannon Nelson <shannon.nelson@amd.com> Link: https://patch.msgid.link/20241107021756.1677-1-liangwentao@iscas.ac.cn Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent d293958 commit 71712cf

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,7 @@ static int ionic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
394394
err_out_pci:
395395
ionic_dev_teardown(ionic);
396396
ionic_clear_pci(ionic);
397+
ionic_debugfs_del_dev(ionic);
397398
err_out:
398399
mutex_destroy(&ionic->dev_cmd_lock);
399400
ionic_devlink_free(ionic);

0 commit comments

Comments
 (0)