]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
iio: gyro: mpu3050: stop double error reporting
authorPeter Rosin <peda@axentia.se>
Mon, 3 Apr 2017 08:38:37 +0000 (10:38 +0200)
committerJonathan Cameron <jic23@kernel.org>
Mon, 3 Apr 2017 19:40:51 +0000 (20:40 +0100)
i2c_mux_add_adapter already logs a message on failure.

Signed-off-by: Peter Rosin <peda@axentia.se>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/gyro/mpu3050-i2c.c

index 06007200bf49ba676ab5aadfb51932f8d8b713a4..93f08b304a6345afda26ec6dbacfa09a2fb8aa3d 100644 (file)
@@ -70,9 +70,8 @@ static int mpu3050_i2c_probe(struct i2c_client *client,
                dev_err(&client->dev, "failed to allocate I2C mux\n");
        else {
                mpu3050->i2cmux->priv = mpu3050;
-               ret = i2c_mux_add_adapter(mpu3050->i2cmux, 0, 0, 0);
-               if (ret)
-                       dev_err(&client->dev, "failed to add I2C mux\n");
+               /* Ignore failure, not critical */
+               i2c_mux_add_adapter(mpu3050->i2cmux, 0, 0, 0);
        }
 
        return 0;