Skip to content

Commit

Permalink
ASoC: cs42l51: Don't log if we fail to allocate memory
Browse files Browse the repository at this point in the history
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>
Acked-by: Brian Austin <brian.austin@cirrus.com>
  • Loading branch information
Mark Brown committed Feb 11, 2014
1 parent dfd72a6 commit 5be7364
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions sound/soc/codecs/cs42l51.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5be7364

Please sign in to comment.