ASoC: max9867: Remove useless assignment
authorLadislav Michl <ladis@linux-mips.org>
Tue, 4 Dec 2018 18:18:17 +0000 (19:18 +0100)
committerMark Brown <broonie@kernel.org>
Fri, 7 Dec 2018 12:20:31 +0000 (12:20 +0000)
ret is assigned later, no need to initialize it.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/max9867.c

index 1cda54b59854f0219ce7aeb4e2d02a12a97b981e..1b155f40b106ef018dda65ce472f023dca5b7aea 100644 (file)
@@ -476,7 +476,7 @@ static int max9867_i2c_probe(struct i2c_client *i2c,
                const struct i2c_device_id *id)
 {
        struct max9867_priv *max9867;
-       int ret = 0, reg;
+       int ret, reg;
 
        max9867 = devm_kzalloc(&i2c->dev, sizeof(*max9867), GFP_KERNEL);
        if (!max9867)
@@ -497,10 +497,8 @@ static int max9867_i2c_probe(struct i2c_client *i2c,
        dev_info(&i2c->dev, "device revision: %x\n", reg);
        ret = devm_snd_soc_register_component(&i2c->dev, &max9867_component,
                        max9867_dai, ARRAY_SIZE(max9867_dai));
-       if (ret < 0) {
+       if (ret < 0)
                dev_err(&i2c->dev, "Failed to register component: %d\n", ret);
-               return ret;
-       }
        return ret;
 }