Skip to content

Commit

Permalink
media: atomisp: pci: fix error return code in atomisp_pci_probe()
Browse files Browse the repository at this point in the history
[ Upstream commit d14e272 ]

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>
  • Loading branch information
Yang Yingliang authored and gregkh committed Sep 18, 2021
1 parent 5b3e68e commit 8142129
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/staging/media/atomisp/pci/atomisp_v4l2.c
Expand Up @@ -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. */
Expand Down

0 comments on commit 8142129

Please sign in to comment.