media: video-mux: Use dev_err_probe()

Simplify the mux error path a bit by using dev_err_probe().

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
This commit is contained in:
Philipp Zabel 2022-04-12 08:29:05 +01:00 committed by Mauro Carvalho Chehab
parent 3bf96b6eeb
commit 011d7456e5
1 changed files with 1 additions and 3 deletions

View File

@ -442,9 +442,7 @@ static int video_mux_probe(struct platform_device *pdev)
vmux->mux = devm_mux_control_get(dev, NULL); vmux->mux = devm_mux_control_get(dev, NULL);
if (IS_ERR(vmux->mux)) { if (IS_ERR(vmux->mux)) {
ret = PTR_ERR(vmux->mux); ret = PTR_ERR(vmux->mux);
if (ret != -EPROBE_DEFER) return dev_err_probe(dev, ret, "Failed to get mux\n");
dev_err(dev, "Failed to get mux: %d\n", ret);
return ret;
} }
mutex_init(&vmux->lock); mutex_init(&vmux->lock);