After calling mantis_pci_init we have to jump to fail2 in order to call the corresponding mantis_pci_exit. Similarly, after calling mantis_get_mac we have already called mantis_pci_init and mantis_i2c_init so we need to jump to fail3 if we want to call the corresponding exit functions. Signed-off-by: Silvan Jegen <s.jegen@xxxxxxxxx> --- drivers/media/pci/mantis/mantis_cards.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/pci/mantis/mantis_cards.c b/drivers/media/pci/mantis/mantis_cards.c index e566061..71497d8 100644 --- a/drivers/media/pci/mantis/mantis_cards.c +++ b/drivers/media/pci/mantis/mantis_cards.c @@ -183,7 +183,7 @@ static int mantis_pci_probe(struct pci_dev *pdev, err = mantis_pci_init(mantis); if (err) { dprintk(MANTIS_ERROR, 1, "ERROR: Mantis PCI initialization failed <%d>", err); - goto fail1; + goto fail2; } err = mantis_stream_control(mantis, STREAM_TO_HIF); @@ -201,7 +201,7 @@ static int mantis_pci_probe(struct pci_dev *pdev, err = mantis_get_mac(mantis); if (err < 0) { dprintk(MANTIS_ERROR, 1, "ERROR: Mantis MAC address read failed <%d>", err); - goto fail2; + goto fail3; } err = mantis_dma_init(mantis); -- 2.2.2 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html