Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[media] c8sectpfe: fix error return code in c8sectpfe_probe()

Fix to return error code -ENODEV from the error handling
case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Acked-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>

authored by

Wei Yongjun and committed by
Mauro Carvalho Chehab
21098562 1f5ecaf9

+2
+2
drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c
··· 813 813 i2c_bus = of_parse_phandle(child, "i2c-bus", 0); 814 814 if (!i2c_bus) { 815 815 dev_err(&pdev->dev, "No i2c-bus found\n"); 816 + ret = -ENODEV; 816 817 goto err_clk_disable; 817 818 } 818 819 tsin->i2c_adapter = ··· 821 820 if (!tsin->i2c_adapter) { 822 821 dev_err(&pdev->dev, "No i2c adapter found\n"); 823 822 of_node_put(i2c_bus); 823 + ret = -ENODEV; 824 824 goto err_clk_disable; 825 825 } 826 826 of_node_put(i2c_bus);