mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 16:13:19 +09:00
drivers: serial: jsm: fix some leaks in probe
This error path needs to unwind instead of just returning directly.
Fixes: 03a8482c17 ("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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
007b20e9ec
commit
1d5859ef22
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user