diff mbox

ASoC: cs4271: Remove unnecessary additional variable definition

Message ID 1495551819-17040-1-git-send-email-ckeepax@opensource.wolfsonmicro.com (mailing list archive)
State Accepted
Commit 177e27133ae9c9f5cbc306feaaa53d8fbc75e45f
Headers show

Commit Message

Charles Keepax May 23, 2017, 3:03 p.m. UTC
The function already defines a ret variable at the top and makes
no particular use of the shadowed definition, as such remove the
redundant definition.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
---
 sound/soc/codecs/cs4271.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Paul Handrigan May 23, 2017, 5:22 p.m. UTC | #1
On Tue, 23 May 2017, Charles Keepax wrote:

> The function already defines a ret variable at the top and makes
> no particular use of the shadowed definition, as such remove the
> redundant definition.
> 
> Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
> ---
>  sound/soc/codecs/cs4271.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/sound/soc/codecs/cs4271.c b/sound/soc/codecs/cs4271.c
> index e78b5f0..d882477 100644
> --- a/sound/soc/codecs/cs4271.c
> +++ b/sound/soc/codecs/cs4271.c
> @@ -674,8 +674,6 @@ static int cs4271_common_probe(struct device *dev,
>  		cs4271->gpio_nreset = cs4271plat->gpio_nreset;
>  
>  	if (gpio_is_valid(cs4271->gpio_nreset)) {
> -		int ret;
> -
>  		ret = devm_gpio_request(dev, cs4271->gpio_nreset,
>  					"CS4271 Reset");
>  		if (ret < 0)
>
Acked-by: Paul Handrigan <Paul.Handrigan@cirrus.com>
diff mbox

Patch

diff --git a/sound/soc/codecs/cs4271.c b/sound/soc/codecs/cs4271.c
index e78b5f0..d882477 100644
--- a/sound/soc/codecs/cs4271.c
+++ b/sound/soc/codecs/cs4271.c
@@ -674,8 +674,6 @@  static int cs4271_common_probe(struct device *dev,
 		cs4271->gpio_nreset = cs4271plat->gpio_nreset;
 
 	if (gpio_is_valid(cs4271->gpio_nreset)) {
-		int ret;
-
 		ret = devm_gpio_request(dev, cs4271->gpio_nreset,
 					"CS4271 Reset");
 		if (ret < 0)