media: platform: exynos4-is: fix return value check in fimc_md_probe()
authorYang Yingliang <yangyingliang@huawei.com>
Mon, 24 Oct 2022 13:46:50 +0000 (21:46 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Dec 2022 12:14:08 +0000 (13:14 +0100)
[ Upstream commit e38e42c078da4af962d322b97e726dcb2f184e3f ]

devm_pinctrl_get() may return ERR_PTR(-EPROBE_DEFER), add a minus sign
to fix it.

Fixes: 4163851f7b99 ("[media] s5p-fimc: Use pinctrl API for camera ports configuration")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/platform/exynos4-is/media-dev.c

index aa5982e..00225e1 100644 (file)
@@ -1472,7 +1472,7 @@ static int fimc_md_probe(struct platform_device *pdev)
        pinctrl = devm_pinctrl_get(dev);
        if (IS_ERR(pinctrl)) {
                ret = PTR_ERR(pinctrl);
-               if (ret != EPROBE_DEFER)
+               if (ret != -EPROBE_DEFER)
                        dev_err(dev, "Failed to get pinctrl: %d\n", ret);
                goto err_clk;
        }