Simplify the mux error path a bit by using dev_err_probe(). Signed-off-by: Philipp Zabel <p.zabel@xxxxxxxxxxxxxx> --- drivers/media/platform/video-mux.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/media/platform/video-mux.c b/drivers/media/platform/video-mux.c index fda8fc0e4814..3e217c365eaf 100644 --- a/drivers/media/platform/video-mux.c +++ b/drivers/media/platform/video-mux.c @@ -440,12 +440,8 @@ static int video_mux_probe(struct platform_device *pdev) } vmux->mux = devm_mux_control_get(dev, NULL); - if (IS_ERR(vmux->mux)) { - ret = PTR_ERR(vmux->mux); - if (ret != -EPROBE_DEFER) - dev_err(dev, "Failed to get mux: %d\n", ret); - return ret; - } + if (IS_ERR(vmux->mux)) + return dev_err_probe(dev, ret, "Failed to get mux\n"); mutex_init(&vmux->lock); vmux->active = -1; -- 2.30.2