]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
media: atomisp: pci: fix error return code in atomisp_pci_probe()
authorYang Yingliang <yangyingliang@huawei.com>
Thu, 17 Jun 2021 07:23:29 +0000 (09:23 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 18 Sep 2021 11:42:03 +0000 (13:42 +0200)
[ Upstream commit d14e272958bdfdc40dcafb827d24ba6fdafa9d52 ]

If init_atomisp_wdts() fails, atomisp_pci_probe() need return
error code.

Link: https://lore.kernel.org/linux-media/20210617072329.1233662-1-yangyingliang@huawei.com
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/staging/media/atomisp/pci/atomisp_v4l2.c

index 02f774ed80c8aa271db9af65dd8a8d77e9a89107..fa1bd99cd6f17758ac3626378aecc6ac9a54f4f2 100644 (file)
@@ -1763,7 +1763,8 @@ static int atomisp_pci_probe(struct pci_dev *pdev, const struct pci_device_id *i
        if (err < 0)
                goto register_entities_fail;
        /* init atomisp wdts */
-       if (init_atomisp_wdts(isp) != 0)
+       err = init_atomisp_wdts(isp);
+       if (err != 0)
                goto wdt_work_queue_fail;
 
        /* save the iunit context only once after all the values are init'ed. */