From 1144d13eaaaec21a55614ca7ade2c8fc1d9f1685 Mon Sep 17 00:00:00 2001 From: Peter Rosin Date: Mon, 3 Apr 2017 10:14:06 +0200 Subject: [PATCH] i2c: arb: gpio-challenge: stop double error reporting i2c_mux_add_adapter already logs a message on failure. Reviewed-by: Wolfram Sang Signed-off-by: Peter Rosin --- drivers/i2c/muxes/i2c-arb-gpio-challenge.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/i2c/muxes/i2c-arb-gpio-challenge.c b/drivers/i2c/muxes/i2c-arb-gpio-challenge.c index 86fc2d4..812b8cf 100644 --- a/drivers/i2c/muxes/i2c-arb-gpio-challenge.c +++ b/drivers/i2c/muxes/i2c-arb-gpio-challenge.c @@ -202,10 +202,8 @@ static int i2c_arbitrator_probe(struct platform_device *pdev) /* Actually add the mux adapter */ ret = i2c_mux_add_adapter(muxc, 0, 0, 0); - if (ret) { - dev_err(dev, "Failed to add adapter\n"); + if (ret) i2c_put_adapter(muxc->parent); - } return ret; } -- 2.7.4