Re: [patch] ASoC: STA529: fix an error message

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Dan,

On 7/11/2012 12:11 PM, Dan Carpenter wrote:
GCC complains that "ret" is uninitialized here.

Signed-off-by: Dan Carpenter<dan.carpenter@xxxxxxxxxx>

diff --git a/sound/soc/codecs/sta529.c b/sound/soc/codecs/sta529.c
index a9f34c7..0c225cd 100644
--- a/sound/soc/codecs/sta529.c
+++ b/sound/soc/codecs/sta529.c
@@ -397,8 +397,9 @@ static __devinit int sta529_i2c_probe(struct i2c_client *i2c,

  	sta529->regmap = devm_regmap_init_i2c(i2c,&sta529_regmap);
  	if (IS_ERR(sta529->regmap)) {
+		ret = PTR_ERR(sta529->regmap);
  		dev_err(&i2c->dev, "Failed to allocate regmap: %d\n", ret);
-		return PTR_ERR(sta529->regmap);
+		return ret;
  	}

  	i2c_set_clientdata(i2c, sta529);
.


Thanks for the patch.

Acked-By: Rajeev Kumar <rajeev-dlh.kumar@xxxxxx>

~Rajeev


--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux