From: Christophe JAILLET Date: Mon, 20 Jun 2022 05:31:53 +0000 (+0100) Subject: media: tw686x: Fix an error handling path in tw686x_probe() X-Git-Tag: v6.0-rc1~139^2~326 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=978bbc392c51e0ece959978daa0ad7fb4dd7f932;p=tomoyo%2Ftomoyo-test1.git media: tw686x: Fix an error handling path in tw686x_probe() The commit in Fixes: is incomplete. It has moved some code in the probe but not all error handling paths have been updated. Now, if request_irq() fails, we must release some resources. Fixes: c8946454ed96 ("media: tw686x: Register the irq at the end of probe") Signed-off-by: Christophe JAILLET Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/pci/tw686x/tw686x-core.c b/drivers/media/pci/tw686x/tw686x-core.c index 384d38754a4b..c53099c958ca 100644 --- a/drivers/media/pci/tw686x/tw686x-core.c +++ b/drivers/media/pci/tw686x/tw686x-core.c @@ -337,12 +337,15 @@ static int tw686x_probe(struct pci_dev *pci_dev, dev->name, dev); if (err < 0) { dev_err(&pci_dev->dev, "unable to request interrupt\n"); - goto iounmap; + goto tw686x_free; } pci_set_drvdata(pci_dev, dev); return 0; +tw686x_free: + tw686x_video_free(dev); + tw686x_audio_free(dev); iounmap: pci_iounmap(pci_dev, dev->mmio); free_region: