ASoC: cs35l33: Remove unnecessary free_irq call
authorAxel Lin <axel.lin@ingics.com>
Tue, 28 Jun 2016 08:40:18 +0000 (16:40 +0800)
committerMark Brown <broonie@kernel.org>
Tue, 28 Jun 2016 19:55:59 +0000 (20:55 +0100)
Current code uses devm_request_threaded_irq() so it does not need to
explicitly call free_irq() in .probe error path and .remove.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Paul Handrigan <Paul.Handrigan@cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/cs35l33.c

index 55c1f758c110e16101c7cd55ad26be95d3010001..90dc743a837859c4199c34fbef49bfadc632aebe 100644 (file)
@@ -1195,7 +1195,7 @@ static int cs35l33_i2c_probe(struct i2c_client *i2c_client,
                dev_err(&i2c_client->dev,
                        "Failed to enable core supplies: %d\n",
                        ret);
-               goto err_irq;
+               return ret;
        }
 
        if (cs35l33->reset_gpio)
@@ -1251,7 +1251,7 @@ static int cs35l33_i2c_probe(struct i2c_client *i2c_client,
        if (ret < 0) {
                dev_err(&i2c_client->dev, "%s: Register codec failed\n",
                        __func__);
-               goto err_irq;
+               goto err_enable;
        }
 
        return 0;
@@ -1259,8 +1259,6 @@ static int cs35l33_i2c_probe(struct i2c_client *i2c_client,
 err_enable:
        regulator_bulk_disable(cs35l33->num_core_supplies,
                               cs35l33->core_supplies);
-err_irq:
-       free_irq(i2c_client->irq, cs35l33);
 
        return ret;
 }
@@ -1277,7 +1275,6 @@ static int cs35l33_i2c_remove(struct i2c_client *client)
        pm_runtime_disable(&client->dev);
        regulator_bulk_disable(cs35l33->num_core_supplies,
                cs35l33->core_supplies);
-       free_irq(client->irq, cs35l33);
 
        return 0;
 }