Skip to content

Commit

Permalink
drivers: serial: jsm: fix some leaks in probe
Browse files Browse the repository at this point in the history
[ Upstream commit 1d5859e ]

This error path needs to unwind instead of just returning directly.

Fixes: 03a8482 ("drivers: serial: jsm: Enable support for Digi Classic adapters")
Signed-off-by: Dan Carpenter <[email protected]>
Link: https://lore.kernel.org/r/YyxFh1+lOeZ9WfKO@kili
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
  • Loading branch information
Dan Carpenter authored and gregkh committed Oct 24, 2022
1 parent 79c3afb commit 7375945
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/tty/serial/jsm/jsm_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 7375945

Please sign in to comment.