[alsa-devel] [PATCH 01/16] ASoC: cs4270: Remove redundant OOM message
Let memory subsystem handle the error logging.
Signed-off-by: Sachin Kamat sachin.kamat@samsung.com --- sound/soc/codecs/cs4270.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/sound/soc/codecs/cs4270.c b/sound/soc/codecs/cs4270.c index 9947a9583679..e6d4ff9fd992 100644 --- a/sound/soc/codecs/cs4270.c +++ b/sound/soc/codecs/cs4270.c @@ -664,10 +664,8 @@ static int cs4270_i2c_probe(struct i2c_client *i2c_client,
cs4270 = devm_kzalloc(&i2c_client->dev, sizeof(struct cs4270_private), GFP_KERNEL); - if (!cs4270) { - dev_err(&i2c_client->dev, "could not allocate codec\n"); + if (!cs4270) return -ENOMEM; - }
/* get the power supply regulators */ for (i = 0; i < ARRAY_SIZE(supply_names); i++)
Let memory subsystem handle the error logging.
Signed-off-by: Sachin Kamat sachin.kamat@samsung.com --- sound/soc/codecs/cs42l73.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/sound/soc/codecs/cs42l73.c b/sound/soc/codecs/cs42l73.c index ae3717992d56..e3b601624794 100644 --- a/sound/soc/codecs/cs42l73.c +++ b/sound/soc/codecs/cs42l73.c @@ -1408,10 +1408,8 @@ static int cs42l73_i2c_probe(struct i2c_client *i2c_client,
cs42l73 = devm_kzalloc(&i2c_client->dev, sizeof(struct cs42l73_private), GFP_KERNEL); - if (!cs42l73) { - dev_err(&i2c_client->dev, "could not allocate codec\n"); + if (!cs42l73) return -ENOMEM; - }
cs42l73->regmap = devm_regmap_init_i2c(i2c_client, &cs42l73_regmap); if (IS_ERR(cs42l73->regmap)) {
On Jun 20, 2014, at 5:04 AM, "Sachin Kamat" sachin.kamat@samsung.com wrote:
Let memory subsystem handle the error logging.
Signed-off-by: Sachin Kamat sachin.kamat@samsung.com
sound/soc/codecs/cs42l73.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/sound/soc/codecs/cs42l73.c b/sound/soc/codecs/cs42l73.c index ae3717992d56..e3b601624794 100644 --- a/sound/soc/codecs/cs42l73.c +++ b/sound/soc/codecs/cs42l73.c @@ -1408,10 +1408,8 @@ static int cs42l73_i2c_probe(struct i2c_client *i2c_client,
cs42l73 = devm_kzalloc(&i2c_client->dev, sizeof(struct cs42l73_private), GFP_KERNEL);
- if (!cs42l73) {
dev_err(&i2c_client->dev, "could not allocate codec\n");
- if (!cs42l73) return -ENOMEM;
}
cs42l73->regmap = devm_regmap_init_i2c(i2c_client, &cs42l73_regmap); if (IS_ERR(cs42l73->regmap)) {
-- 1.7.9.5
Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-
Please CC the driver maintainers.
Acked-by: Paul Handrigan Paul.Handrigan@cirrus.com
Let memory subsystem handle the error logging.
Signed-off-by: Sachin Kamat sachin.kamat@samsung.com --- sound/soc/codecs/sgtl5000.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c index 3d39f0b5b4a8..249fadbdb42e 100644 --- a/sound/soc/codecs/sgtl5000.c +++ b/sound/soc/codecs/sgtl5000.c @@ -843,10 +843,8 @@ static int ldo_regulator_register(struct snd_soc_codec *codec,
ldo = kzalloc(sizeof(struct ldo_regulator), GFP_KERNEL);
- if (!ldo) { - dev_err(codec->dev, "failed to allocate ldo_regulator\n"); + if (!ldo) return -ENOMEM; - }
ldo->desc.name = kstrdup(dev_name(codec->dev), GFP_KERNEL); if (!ldo->desc.name) {
Let memory subsystem handle the error logging.
Signed-off-by: Sachin Kamat sachin.kamat@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)) {
Let memory subsystem handle the error logging.
Signed-off-by: Sachin Kamat sachin.kamat@samsung.com --- sound/soc/codecs/tlv320aic3x.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c index e12fafbb1e09..446303198ffd 100644 --- a/sound/soc/codecs/tlv320aic3x.c +++ b/sound/soc/codecs/tlv320aic3x.c @@ -1477,10 +1477,8 @@ static int aic3x_i2c_probe(struct i2c_client *i2c, u32 value;
aic3x = devm_kzalloc(&i2c->dev, sizeof(struct aic3x_priv), GFP_KERNEL); - if (aic3x == NULL) { - dev_err(&i2c->dev, "failed to create private data\n"); + if (!aic3x) return -ENOMEM; - }
aic3x->regmap = devm_regmap_init_i2c(i2c, &aic3x_regmap); if (IS_ERR(aic3x->regmap)) { @@ -1498,10 +1496,8 @@ static int aic3x_i2c_probe(struct i2c_client *i2c, } else if (np) { ai3x_setup = devm_kzalloc(&i2c->dev, sizeof(*ai3x_setup), GFP_KERNEL); - if (ai3x_setup == NULL) { - dev_err(&i2c->dev, "failed to create private data\n"); + if (!ai3x_setup) return -ENOMEM; - }
ret = of_get_named_gpio(np, "gpio-reset", 0); if (ret >= 0)
Let memory subsystem handle the error logging.
Signed-off-by: Sachin Kamat sachin.kamat@samsung.com --- sound/soc/codecs/tpa6130a2.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/sound/soc/codecs/tpa6130a2.c b/sound/soc/codecs/tpa6130a2.c index 8fc5a647453b..6fac9e034c48 100644 --- a/sound/soc/codecs/tpa6130a2.c +++ b/sound/soc/codecs/tpa6130a2.c @@ -381,10 +381,8 @@ static int tpa6130a2_probe(struct i2c_client *client, dev = &client->dev;
data = devm_kzalloc(&client->dev, sizeof(*data), GFP_KERNEL); - if (data == NULL) { - dev_err(dev, "Can not allocate memory\n"); + if (!data) return -ENOMEM; - }
if (pdata) { data->power_gpio = pdata->power_gpio;
Let memory subsystem handle the error logging.
Signed-off-by: Sachin Kamat sachin.kamat@samsung.com --- sound/soc/codecs/twl4030.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/sound/soc/codecs/twl4030.c b/sound/soc/codecs/twl4030.c index 69e12a311ba2..955df35c5ab6 100644 --- a/sound/soc/codecs/twl4030.c +++ b/sound/soc/codecs/twl4030.c @@ -2162,10 +2162,8 @@ static int twl4030_soc_probe(struct snd_soc_codec *codec)
twl4030 = devm_kzalloc(codec->dev, sizeof(struct twl4030_priv), GFP_KERNEL); - if (twl4030 == NULL) { - dev_err(codec->dev, "Can not allocate memory\n"); + if (!twl4030) return -ENOMEM; - } snd_soc_codec_set_drvdata(codec, twl4030); /* Set the defaults, and power up the codec */ twl4030->sysclk = twl4030_audio_get_mclk() / 1000;
Let memory subsystem handle the error logging.
Signed-off-by: Sachin Kamat sachin.kamat@samsung.com --- sound/soc/codecs/wl1273.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/sound/soc/codecs/wl1273.c b/sound/soc/codecs/wl1273.c index 4ead0dc02b87..5d8ba779085b 100644 --- a/sound/soc/codecs/wl1273.c +++ b/sound/soc/codecs/wl1273.c @@ -461,10 +461,8 @@ static int wl1273_probe(struct snd_soc_codec *codec) }
wl1273 = kzalloc(sizeof(struct wl1273_priv), GFP_KERNEL); - if (wl1273 == NULL) { - dev_err(codec->dev, "Cannot allocate memory.\n"); + if (!wl1273) return -ENOMEM; - }
wl1273->mode = WL1273_MODE_BT; wl1273->core = *core;
Let memory subsystem handle the error logging.
Signed-off-by: Sachin Kamat sachin.kamat@samsung.com --- sound/soc/codecs/wm0010.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/sound/soc/codecs/wm0010.c b/sound/soc/codecs/wm0010.c index 71ce3159a62e..982467c1d56a 100644 --- a/sound/soc/codecs/wm0010.c +++ b/sound/soc/codecs/wm0010.c @@ -413,7 +413,6 @@ static int wm0010_firmware_load(const char *name, struct snd_soc_codec *codec)
xfer = kzalloc(sizeof(*xfer), GFP_KERNEL); if (!xfer) { - dev_err(codec->dev, "Failed to allocate xfer\n"); ret = -ENOMEM; goto abort; } @@ -423,8 +422,6 @@ static int wm0010_firmware_load(const char *name, struct snd_soc_codec *codec)
out = kzalloc(len, GFP_KERNEL | GFP_DMA); if (!out) { - dev_err(codec->dev, - "Failed to allocate RX buffer\n"); ret = -ENOMEM; goto abort1; } @@ -432,8 +429,6 @@ static int wm0010_firmware_load(const char *name, struct snd_soc_codec *codec)
img = kzalloc(len, GFP_KERNEL | GFP_DMA); if (!img) { - dev_err(codec->dev, - "Failed to allocate image buffer\n"); ret = -ENOMEM; goto abort1; } @@ -526,14 +521,12 @@ static int wm0010_stage2_load(struct snd_soc_codec *codec) /* Copy to local buffer first as vmalloc causes problems for dma */ img = kzalloc(fw->size, GFP_KERNEL | GFP_DMA); if (!img) { - dev_err(codec->dev, "Failed to allocate image buffer\n"); ret = -ENOMEM; goto abort2; }
out = kzalloc(fw->size, GFP_KERNEL | GFP_DMA); if (!out) { - dev_err(codec->dev, "Failed to allocate output buffer\n"); ret = -ENOMEM; goto abort1; } @@ -679,11 +672,8 @@ static int wm0010_boot(struct snd_soc_codec *codec) }
img_swap = kzalloc(len, GFP_KERNEL | GFP_DMA); - if (!img_swap) { - dev_err(codec->dev, - "Failed to allocate image buffer\n"); + if (!img_swap) goto abort; - }
/* We need to re-order for 0010 */ byte_swap_64((u64 *)&pll_rec, img_swap, len);
On Fri, Jun 20, 2014 at 03:29:05PM +0530, Sachin Kamat wrote:
Let memory subsystem handle the error logging.
Signed-off-by: Sachin Kamat sachin.kamat@samsung.com
Acked-by: Charles Keepax ckeepax@opensource.wolfsonmicro.com
Thanks, Charles
Let memory subsystem handle the error logging.
Signed-off-by: Sachin Kamat sachin.kamat@samsung.com --- sound/soc/codecs/wm1250-ev1.c | 1 - 1 file changed, 1 deletion(-)
diff --git a/sound/soc/codecs/wm1250-ev1.c b/sound/soc/codecs/wm1250-ev1.c index 6e6b93d4696e..8011f75fb6cb 100644 --- a/sound/soc/codecs/wm1250-ev1.c +++ b/sound/soc/codecs/wm1250-ev1.c @@ -164,7 +164,6 @@ static int wm1250_ev1_pdata(struct i2c_client *i2c)
wm1250 = devm_kzalloc(&i2c->dev, sizeof(*wm1250), GFP_KERNEL); if (!wm1250) { - dev_err(&i2c->dev, "Unable to allocate private data\n"); ret = -ENOMEM; goto err; }
On Fri, Jun 20, 2014 at 03:29:06PM +0530, Sachin Kamat wrote:
Let memory subsystem handle the error logging.
Signed-off-by: Sachin Kamat sachin.kamat@samsung.com
Acked-by: Charles Keepax ckeepax@opensource.wolfsonmicro.com
Thanks, Charles
Let memory subsystem handle the error logging.
Signed-off-by: Sachin Kamat sachin.kamat@samsung.com --- sound/soc/codecs/wm2000.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/sound/soc/codecs/wm2000.c b/sound/soc/codecs/wm2000.c index a4c352cc3464..34ef65c52a7d 100644 --- a/sound/soc/codecs/wm2000.c +++ b/sound/soc/codecs/wm2000.c @@ -826,10 +826,8 @@ static int wm2000_i2c_probe(struct i2c_client *i2c,
wm2000 = devm_kzalloc(&i2c->dev, sizeof(struct wm2000_priv), GFP_KERNEL); - if (wm2000 == NULL) { - dev_err(&i2c->dev, "Unable to allocate private data\n"); + if (!wm2000) return -ENOMEM; - }
mutex_init(&wm2000->lock);
On Fri, Jun 20, 2014 at 03:29:07PM +0530, Sachin Kamat wrote:
Let memory subsystem handle the error logging.
Signed-off-by: Sachin Kamat sachin.kamat@samsung.com
Acked-by: Charles Keepax ckeepax@opensource.wolfsonmicro.com
Thanks, Charles
Let memory subsystem handle the error logging.
Signed-off-by: Sachin Kamat sachin.kamat@samsung.com --- sound/soc/codecs/wm8904.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/sound/soc/codecs/wm8904.c b/sound/soc/codecs/wm8904.c index da46c2ad0566..17164758abcc 100644 --- a/sound/soc/codecs/wm8904.c +++ b/sound/soc/codecs/wm8904.c @@ -2017,12 +2017,8 @@ static void wm8904_handle_pdata(struct snd_soc_codec *codec) /* We need an array of texts for the enum API */ wm8904->drc_texts = kmalloc(sizeof(char *) * pdata->num_drc_cfgs, GFP_KERNEL); - if (!wm8904->drc_texts) { - dev_err(codec->dev, - "Failed to allocate %d DRC config texts\n", - pdata->num_drc_cfgs); + if (!wm8904->drc_texts) return; - }
for (i = 0; i < pdata->num_drc_cfgs; i++) wm8904->drc_texts[i] = pdata->drc_cfgs[i].name;
On Fri, Jun 20, 2014 at 03:29:08PM +0530, Sachin Kamat wrote:
Let memory subsystem handle the error logging.
Signed-off-by: Sachin Kamat sachin.kamat@samsung.com
Acked-by: Charles Keepax ckeepax@opensource.wolfsonmicro.com
Thanks, Charles
Let memory subsystem handle the error logging.
Signed-off-by: Sachin Kamat sachin.kamat@samsung.com --- sound/soc/codecs/wm8958-dsp2.c | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-)
diff --git a/sound/soc/codecs/wm8958-dsp2.c b/sound/soc/codecs/wm8958-dsp2.c index b2ebb104d879..0dada7f0105e 100644 --- a/sound/soc/codecs/wm8958-dsp2.c +++ b/sound/soc/codecs/wm8958-dsp2.c @@ -934,12 +934,8 @@ void wm8958_dsp2_init(struct snd_soc_codec *codec) /* We need an array of texts for the enum API */ wm8994->mbc_texts = kmalloc(sizeof(char *) * pdata->num_mbc_cfgs, GFP_KERNEL); - if (!wm8994->mbc_texts) { - dev_err(wm8994->hubs.codec->dev, - "Failed to allocate %d MBC config texts\n", - pdata->num_mbc_cfgs); + if (!wm8994->mbc_texts) return; - }
for (i = 0; i < pdata->num_mbc_cfgs; i++) wm8994->mbc_texts[i] = pdata->mbc_cfgs[i].name; @@ -963,12 +959,8 @@ void wm8958_dsp2_init(struct snd_soc_codec *codec) /* We need an array of texts for the enum API */ wm8994->vss_texts = kmalloc(sizeof(char *) * pdata->num_vss_cfgs, GFP_KERNEL); - if (!wm8994->vss_texts) { - dev_err(wm8994->hubs.codec->dev, - "Failed to allocate %d VSS config texts\n", - pdata->num_vss_cfgs); + if (!wm8994->vss_texts) return; - }
for (i = 0; i < pdata->num_vss_cfgs; i++) wm8994->vss_texts[i] = pdata->vss_cfgs[i].name; @@ -993,12 +985,8 @@ void wm8958_dsp2_init(struct snd_soc_codec *codec) /* We need an array of texts for the enum API */ wm8994->vss_hpf_texts = kmalloc(sizeof(char *) * pdata->num_vss_hpf_cfgs, GFP_KERNEL); - if (!wm8994->vss_hpf_texts) { - dev_err(wm8994->hubs.codec->dev, - "Failed to allocate %d VSS HPF config texts\n", - pdata->num_vss_hpf_cfgs); + if (!wm8994->vss_hpf_texts) return; - }
for (i = 0; i < pdata->num_vss_hpf_cfgs; i++) wm8994->vss_hpf_texts[i] = pdata->vss_hpf_cfgs[i].name; @@ -1024,12 +1012,8 @@ void wm8958_dsp2_init(struct snd_soc_codec *codec) /* We need an array of texts for the enum API */ wm8994->enh_eq_texts = kmalloc(sizeof(char *) * pdata->num_enh_eq_cfgs, GFP_KERNEL); - if (!wm8994->enh_eq_texts) { - dev_err(wm8994->hubs.codec->dev, - "Failed to allocate %d enhanced EQ config texts\n", - pdata->num_enh_eq_cfgs); + if (!wm8994->enh_eq_texts) return; - }
for (i = 0; i < pdata->num_enh_eq_cfgs; i++) wm8994->enh_eq_texts[i] = pdata->enh_eq_cfgs[i].name;
On Fri, Jun 20, 2014 at 03:29:09PM +0530, Sachin Kamat wrote:
Let memory subsystem handle the error logging.
Signed-off-by: Sachin Kamat sachin.kamat@samsung.com
Acked-by: Charles Keepax ckeepax@opensource.wolfsonmicro.com
Thanks, Charles
Let memory subsystem handle the error logging.
Signed-off-by: Sachin Kamat sachin.kamat@samsung.com --- sound/soc/codecs/wm8994.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c index 9719d3ca8e47..39d8df040116 100644 --- a/sound/soc/codecs/wm8994.c +++ b/sound/soc/codecs/wm8994.c @@ -3296,12 +3296,8 @@ static void wm8994_handle_pdata(struct wm8994_priv *wm8994) /* We need an array of texts for the enum API */ wm8994->drc_texts = devm_kzalloc(wm8994->hubs.codec->dev, sizeof(char *) * pdata->num_drc_cfgs, GFP_KERNEL); - if (!wm8994->drc_texts) { - dev_err(wm8994->hubs.codec->dev, - "Failed to allocate %d DRC config texts\n", - pdata->num_drc_cfgs); + if (!wm8994->drc_texts) return; - }
for (i = 0; i < pdata->num_drc_cfgs; i++) wm8994->drc_texts[i] = pdata->drc_cfgs[i].name;
On Fri, Jun 20, 2014 at 03:29:10PM +0530, Sachin Kamat wrote:
Let memory subsystem handle the error logging.
Signed-off-by: Sachin Kamat sachin.kamat@samsung.com
Acked-by: Charles Keepax ckeepax@opensource.wolfsonmicro.com
Thanks, Charles
Let memory subsystem handle the error logging.
Signed-off-by: Sachin Kamat sachin.kamat@samsung.com --- sound/soc/codecs/wm9090.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/sound/soc/codecs/wm9090.c b/sound/soc/codecs/wm9090.c index 87934171f063..a13f0725611a 100644 --- a/sound/soc/codecs/wm9090.c +++ b/sound/soc/codecs/wm9090.c @@ -613,10 +613,8 @@ static int wm9090_i2c_probe(struct i2c_client *i2c, int ret;
wm9090 = devm_kzalloc(&i2c->dev, sizeof(*wm9090), GFP_KERNEL); - if (wm9090 == NULL) { - dev_err(&i2c->dev, "Can not allocate memory\n"); + if (!wm9090) return -ENOMEM; - }
wm9090->regmap = devm_regmap_init_i2c(i2c, &wm9090_regmap); if (IS_ERR(wm9090->regmap)) {
On Fri, Jun 20, 2014 at 03:29:11PM +0530, Sachin Kamat wrote:
Let memory subsystem handle the error logging.
Signed-off-by: Sachin Kamat sachin.kamat@samsung.com
Acked-by: Charles Keepax ckeepax@opensource.wolfsonmicro.com
Thanks, Charles
Let memory subsystem handle the error logging.
Signed-off-by: Sachin Kamat sachin.kamat@samsung.com --- sound/soc/codecs/wm_hubs.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/sound/soc/codecs/wm_hubs.c b/sound/soc/codecs/wm_hubs.c index 916817fe6632..374537d5e179 100644 --- a/sound/soc/codecs/wm_hubs.c +++ b/sound/soc/codecs/wm_hubs.c @@ -183,10 +183,8 @@ static void wm_hubs_dcs_cache_set(struct snd_soc_codec *codec, u16 dcs_cfg) return;
cache = devm_kzalloc(codec->dev, sizeof(*cache), GFP_KERNEL); - if (!cache) { - dev_err(codec->dev, "Failed to allocate DCS cache entry\n"); + if (!cache) return; - }
cache->left = snd_soc_read(codec, WM8993_LEFT_OUTPUT_VOLUME); cache->left &= WM8993_HPOUT1L_VOL_MASK;
On Fri, Jun 20, 2014 at 03:29:12PM +0530, Sachin Kamat wrote:
Let memory subsystem handle the error logging.
Signed-off-by: Sachin Kamat sachin.kamat@samsung.com
Acked-by: Charles Keepax ckeepax@opensource.wolfsonmicro.com
Thanks, Charles
On 6/20/2014 3:28 PM, Sachin Kamat wrote:
Let memory subsystem handle the error logging.
Signed-off-by: Sachin Kamat sachin.kamat@samsung.com
sound/soc/codecs/cs4270.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/sound/soc/codecs/cs4270.c b/sound/soc/codecs/cs4270.c index 9947a9583679..e6d4ff9fd992 100644 --- a/sound/soc/codecs/cs4270.c +++ b/sound/soc/codecs/cs4270.c @@ -664,10 +664,8 @@ static int cs4270_i2c_probe(struct i2c_client *i2c_client,
cs4270 = devm_kzalloc(&i2c_client->dev, sizeof(struct cs4270_private), GFP_KERNEL);
- if (!cs4270) {
dev_err(&i2c_client->dev, "could not allocate codec\n");
You are just removing a information which are required in error condition. In my view it should be here..
~Rajeev
- if (!cs4270) return -ENOMEM;
}
/* get the power supply regulators */ for (i = 0; i < ARRAY_SIZE(supply_names); i++)
On 06/20/2014 01:04 PM, Rajeev kumar wrote:
On 6/20/2014 3:28 PM, Sachin Kamat wrote:
Let memory subsystem handle the error logging.
Signed-off-by: Sachin Kamat sachin.kamat@samsung.com
sound/soc/codecs/cs4270.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/sound/soc/codecs/cs4270.c b/sound/soc/codecs/cs4270.c index 9947a9583679..e6d4ff9fd992 100644 --- a/sound/soc/codecs/cs4270.c +++ b/sound/soc/codecs/cs4270.c @@ -664,10 +664,8 @@ static int cs4270_i2c_probe(struct i2c_client *i2c_client,
cs4270 = devm_kzalloc(&i2c_client->dev, sizeof(struct cs4270_private), GFP_KERNEL);
- if (!cs4270) {
dev_err(&i2c_client->dev, "could not allocate codec\n");
You are just removing a information which are required in error condition. In my view it should be here..
devm_kzalloc already prints a error message when the allocation fails.
On Jun 20, 2014, at 5:03 AM, "Sachin Kamat" sachin.kamat@samsung.com wrote:
Let memory subsystem handle the error logging.
Signed-off-by: Sachin Kamat sachin.kamat@samsung.com
sound/soc/codecs/cs4270.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/sound/soc/codecs/cs4270.c b/sound/soc/codecs/cs4270.c index 9947a9583679..e6d4ff9fd992 100644 --- a/sound/soc/codecs/cs4270.c +++ b/sound/soc/codecs/cs4270.c @@ -664,10 +664,8 @@ static int cs4270_i2c_probe(struct i2c_client *i2c_client,
cs4270 = devm_kzalloc(&i2c_client->dev, sizeof(struct cs4270_private), GFP_KERNEL);
- if (!cs4270) {
dev_err(&i2c_client->dev, "could not allocate codec\n");
- if (!cs4270) return -ENOMEM;
}
/* get the power supply regulators */ for (i = 0; i < ARRAY_SIZE(supply_names); i++)
-- 1.7.9.5
Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Please CC the driver maintainers.
Acked-by: Paul Handrigan Paul.Handrigan@cirrus.com
participants (6)
-
Charles Keepax
-
Handrigan, Paul
-
Lars-Peter Clausen
-
Mark Brown
-
Rajeev kumar
-
Sachin Kamat