[1/2] ASoC: cs42l51: Don't log if we fail to allocate memory
diff mbox

Message ID 1392146808-19269-1-git-send-email-broonie@kernel.org
State Accepted
Commit 5be736442ed94217c6521ae0c948abab995f281f
Headers show

Commit Message

Mark Brown Feb. 11, 2014, 7:26 p.m. UTC
From: Mark Brown <broonie@linaro.org>

The VM subsystem already logs quite loudly if we run out of memory so
don't bother here.

Signed-off-by: Mark Brown <broonie@linaro.org>
---
 sound/soc/codecs/cs42l51.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Austin, Brian Feb. 11, 2014, 7:47 p.m. UTC | #1
> On Feb 11, 2014, at 13:27, "Mark Brown" <broonie@kernel.org> wrote:
> 
> From: Mark Brown <broonie@linaro.org>
> 
> The VM subsystem already logs quite loudly if we run out of memory so
> don't bother here.
> 
> Signed-off-by: Mark Brown <broonie@linaro.org>
> ---
> sound/soc/codecs/cs42l51.c
Acked-by: Brian Austin <brian.austin@cirrus.com>

Patch
diff mbox

diff --git a/sound/soc/codecs/cs42l51.c b/sound/soc/codecs/cs42l51.c
index 6e9ea8379a91..50c08c8fc9bc 100644
--- a/sound/soc/codecs/cs42l51.c
+++ b/sound/soc/codecs/cs42l51.c
@@ -574,10 +574,8 @@  static int cs42l51_i2c_probe(struct i2c_client *i2c_client,
 
 	cs42l51 = devm_kzalloc(&i2c_client->dev, sizeof(struct cs42l51_private),
 			       GFP_KERNEL);
-	if (!cs42l51) {
-		dev_err(&i2c_client->dev, "could not allocate codec\n");
+	if (!cs42l51)
 		return -ENOMEM;
-	}
 
 	i2c_set_clientdata(i2c_client, cs42l51);
 	cs42l51->control_type = SND_SOC_I2C;