diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2022-09-22 14:22:47 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-09-22 16:11:43 +0200 |
commit | 1d5859ef229e381f4db38dce8ed58e4bf862006b (patch) | |
tree | 1054ef3660b2e20f35982c5ae9c2ba6c9eaaa707 /drivers/tty/serial/jsm | |
parent | 007b20e9ec8d8f5f57cf48b3d129616cf4c0c102 (diff) |
drivers: serial: jsm: fix some leaks in probe
This error path needs to unwind instead of just returning directly.
Fixes: 03a8482c17dd ("drivers: serial: jsm: Enable support for Digi Classic adapters")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/YyxFh1+lOeZ9WfKO@kili
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/jsm')
-rw-r--r-- | drivers/tty/serial/jsm/jsm_driver.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/tty/serial/jsm/jsm_driver.c b/drivers/tty/serial/jsm/jsm_driver.c index 0ea799bf8dbb..417a5b6bffc3 100644 --- a/drivers/tty/serial/jsm/jsm_driver.c +++ b/drivers/tty/serial/jsm/jsm_driver.c @@ -211,7 +211,8 @@ static int jsm_probe_one(struct pci_dev *pdev, const struct pci_device_id *ent) break; default: - return -ENXIO; + rc = -ENXIO; + goto out_kfree_brd; } rc = request_irq(brd->irq, brd->bd_ops->intr, IRQF_SHARED, "JSM", brd); |