Commit 477d4d38 authored by Dan Carpenter's avatar Dan Carpenter Committed by Mauro Carvalho Chehab

media: pxa_camera: remove an impossible condition

It's not possible for "pcdev->mclk" to be zero because we check for
that earlier and set it to 20000000 in that situation.  If it were
possible, that would be a problem because it could have lead to an Oops
in the error handling when we call v4l2_clk_unregister(pcdev->mclk_clk);
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-by: default avatarRobert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent ec050e02
......@@ -2504,17 +2504,14 @@ static int pxa_camera_probe(struct platform_device *pdev)
if (err)
goto exit_notifier_cleanup;
if (pcdev->mclk) {
v4l2_clk_name_i2c(clk_name, sizeof(clk_name),
pcdev->asd.match.i2c.adapter_id,
pcdev->asd.match.i2c.address);
pcdev->mclk_clk = v4l2_clk_register(&pxa_camera_mclk_ops,
clk_name, NULL);
if (IS_ERR(pcdev->mclk_clk)) {
err = PTR_ERR(pcdev->mclk_clk);
goto exit_notifier_cleanup;
}
v4l2_clk_name_i2c(clk_name, sizeof(clk_name),
pcdev->asd.match.i2c.adapter_id,
pcdev->asd.match.i2c.address);
pcdev->mclk_clk = v4l2_clk_register(&pxa_camera_mclk_ops, clk_name, NULL);
if (IS_ERR(pcdev->mclk_clk)) {
err = PTR_ERR(pcdev->mclk_clk);
goto exit_notifier_cleanup;
}
err = v4l2_async_notifier_register(&pcdev->v4l2_dev, &pcdev->notifier);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment