]> git.baikalelectronics.ru Git - kernel.git/commitdiff
i2c: mux: gpio: stop double error reporting
authorPeter Rosin <peda@axentia.se>
Mon, 3 Apr 2017 08:14:11 +0000 (10:14 +0200)
committerPeter Rosin <peda@axentia.se>
Mon, 3 Apr 2017 12:07:32 +0000 (14:07 +0200)
i2c_mux_add_adapter already logs a message on failure.

Reviewed-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Peter Rosin <peda@axentia.se>
drivers/i2c/muxes/i2c-mux-gpio.c

index 655684d621a41d9855223ea2e5c463ff61e27ff6..1a9973ede4436d7f583c9c602b5c12e265f680fa 100644 (file)
@@ -245,10 +245,8 @@ static int i2c_mux_gpio_probe(struct platform_device *pdev)
                unsigned int class = mux->data.classes ? mux->data.classes[i] : 0;
 
                ret = i2c_mux_add_adapter(muxc, nr, mux->data.values[i], class);
-               if (ret) {
-                       dev_err(&pdev->dev, "Failed to add adapter %d\n", i);
+               if (ret)
                        goto add_adapter_failed;
-               }
        }
 
        dev_info(&pdev->dev, "%d port mux on %s adapter\n",