[alsa-devel] [PATCH 04/16] ASoC: sta529: Remove redundant OOM message

Sachin Kamat sachin.kamat at samsung.com
Fri Jun 20 11:59:00 CEST 2014


Let memory subsystem handle the error logging.

Signed-off-by: Sachin Kamat <sachin.kamat at samsung.com>
---
 sound/soc/codecs/sta529.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sound/soc/codecs/sta529.c b/sound/soc/codecs/sta529.c
index a40c4b0196a3..fcdf11026aff 100644
--- a/sound/soc/codecs/sta529.c
+++ b/sound/soc/codecs/sta529.c
@@ -380,10 +380,8 @@ static int sta529_i2c_probe(struct i2c_client *i2c,
 		return -EINVAL;
 
 	sta529 = devm_kzalloc(&i2c->dev, sizeof(struct sta529), GFP_KERNEL);
-	if (sta529 == NULL) {
-		dev_err(&i2c->dev, "Can not allocate memory\n");
+	if (!sta529)
 		return -ENOMEM;
-	}
 
 	sta529->regmap = devm_regmap_init_i2c(i2c, &sta529_regmap);
 	if (IS_ERR(sta529->regmap)) {
-- 
1.7.9.5



More information about the Alsa-devel mailing list