Skip to content

Commit 7375945

Browse files
Dan Carpentergregkh
authored andcommitted
drivers: serial: jsm: fix some leaks in probe
[ 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]>
1 parent 79c3afb commit 7375945

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/tty/serial/jsm/jsm_driver.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,8 @@ static int jsm_probe_one(struct pci_dev *pdev, const struct pci_device_id *ent)
211211

212212
break;
213213
default:
214-
return -ENXIO;
214+
rc = -ENXIO;
215+
goto out_kfree_brd;
215216
}
216217

217218
rc = request_irq(brd->irq, brd->bd_ops->intr, IRQF_SHARED, "JSM", brd);

0 commit comments

Comments
 (0)