All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] ASoC-cs42l73: Adjustments for two function implementations
@ 2017-11-22 15:46 ` SF Markus Elfring
  0 siblings, 0 replies; 24+ messages in thread
From: SF Markus Elfring @ 2017-11-22 15:46 UTC (permalink / raw)
  To: alsa-devel, Brian Austin, Jaroslav Kysela, Liam Girdwood,
	Mark Brown, Paul Handrigan, Takashi Iwai
  Cc: LKML, kernel-janitors

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 22 Nov 2017 16:38:32 +0100

Three update suggestions were taken into account
from static source code analysis.

Markus Elfring (3):
  Delete an error message for a failed memory allocation in cs42l73_i2c_probe()
  Improve two size determinations in cs42l73_i2c_probe()
  Fix a typo in two comments

 sound/soc/codecs/cs42l73.c | 20 ++++++++------------
 1 file changed, 8 insertions(+), 12 deletions(-)

-- 
2.15.0

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH 0/3] ASoC-cs42l73: Adjustments for two function implementations
@ 2017-11-22 15:46 ` SF Markus Elfring
  0 siblings, 0 replies; 24+ messages in thread
From: SF Markus Elfring @ 2017-11-22 15:46 UTC (permalink / raw)
  To: alsa-devel, Brian Austin, Jaroslav Kysela, Liam Girdwood,
	Mark Brown, Paul Handrigan, Takashi Iwai
  Cc: kernel-janitors, LKML

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 22 Nov 2017 16:38:32 +0100

Three update suggestions were taken into account
from static source code analysis.

Markus Elfring (3):
  Delete an error message for a failed memory allocation in cs42l73_i2c_probe()
  Improve two size determinations in cs42l73_i2c_probe()
  Fix a typo in two comments

 sound/soc/codecs/cs42l73.c | 20 ++++++++------------
 1 file changed, 8 insertions(+), 12 deletions(-)

-- 
2.15.0


^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH 0/3] ASoC-cs42l73: Adjustments for two function implementations
@ 2017-11-22 15:46 ` SF Markus Elfring
  0 siblings, 0 replies; 24+ messages in thread
From: SF Markus Elfring @ 2017-11-22 15:46 UTC (permalink / raw)
  To: alsa-devel, Brian Austin, Jaroslav Kysela, Liam Girdwood,
	Mark Brown, Paul Handrigan, Takashi Iwai
  Cc: kernel-janitors, LKML

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 22 Nov 2017 16:38:32 +0100

Three update suggestions were taken into account
from static source code analysis.

Markus Elfring (3):
  Delete an error message for a failed memory allocation in cs42l73_i2c_probe()
  Improve two size determinations in cs42l73_i2c_probe()
  Fix a typo in two comments

 sound/soc/codecs/cs42l73.c | 20 ++++++++------------
 1 file changed, 8 insertions(+), 12 deletions(-)

-- 
2.15.0

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH 1/3] ASoC: cs42l73: Delete an error message for a failed memory allocation in cs42l73_i2c_probe()
  2017-11-22 15:46 ` SF Markus Elfring
  (?)
@ 2017-11-22 15:48   ` SF Markus Elfring
  -1 siblings, 0 replies; 24+ messages in thread
From: SF Markus Elfring @ 2017-11-22 15:48 UTC (permalink / raw)
  To: alsa-devel, Brian Austin, Jaroslav Kysela, Liam Girdwood,
	Mark Brown, Paul Handrigan, Takashi Iwai
  Cc: LKML, kernel-janitors

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 22 Nov 2017 15:50:46 +0100

Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 sound/soc/codecs/cs42l73.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/sound/soc/codecs/cs42l73.c b/sound/soc/codecs/cs42l73.c
index 3df2c473ab88..978cfbbad408 100644
--- a/sound/soc/codecs/cs42l73.c
+++ b/sound/soc/codecs/cs42l73.c
@@ -1307,10 +1307,9 @@ static int cs42l73_i2c_probe(struct i2c_client *i2c_client,
 		pdata = devm_kzalloc(&i2c_client->dev,
 				     sizeof(struct cs42l73_platform_data),
 				GFP_KERNEL);
-		if (!pdata) {
-			dev_err(&i2c_client->dev, "could not allocate pdata\n");
+		if (!pdata)
 			return -ENOMEM;
-		}
+
 		if (i2c_client->dev.of_node) {
 			if (of_property_read_u32(i2c_client->dev.of_node,
 				"chgfreq", &val32) >= 0)
-- 
2.15.0

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 1/3] ASoC: cs42l73: Delete an error message for a failed memory allocation in cs42l73_i2c_pro
@ 2017-11-22 15:48   ` SF Markus Elfring
  0 siblings, 0 replies; 24+ messages in thread
From: SF Markus Elfring @ 2017-11-22 15:48 UTC (permalink / raw)
  To: alsa-devel, Brian Austin, Jaroslav Kysela, Liam Girdwood,
	Mark Brown, Paul Handrigan, Takashi Iwai
  Cc: kernel-janitors, LKML

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 22 Nov 2017 15:50:46 +0100

Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 sound/soc/codecs/cs42l73.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/sound/soc/codecs/cs42l73.c b/sound/soc/codecs/cs42l73.c
index 3df2c473ab88..978cfbbad408 100644
--- a/sound/soc/codecs/cs42l73.c
+++ b/sound/soc/codecs/cs42l73.c
@@ -1307,10 +1307,9 @@ static int cs42l73_i2c_probe(struct i2c_client *i2c_client,
 		pdata = devm_kzalloc(&i2c_client->dev,
 				     sizeof(struct cs42l73_platform_data),
 				GFP_KERNEL);
-		if (!pdata) {
-			dev_err(&i2c_client->dev, "could not allocate pdata\n");
+		if (!pdata)
 			return -ENOMEM;
-		}
+
 		if (i2c_client->dev.of_node) {
 			if (of_property_read_u32(i2c_client->dev.of_node,
 				"chgfreq", &val32) >= 0)
-- 
2.15.0


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 1/3] ASoC: cs42l73: Delete an error message for a failed memory allocation in cs42l73_i2c_probe()
@ 2017-11-22 15:48   ` SF Markus Elfring
  0 siblings, 0 replies; 24+ messages in thread
From: SF Markus Elfring @ 2017-11-22 15:48 UTC (permalink / raw)
  To: alsa-devel, Brian Austin, Jaroslav Kysela, Liam Girdwood,
	Mark Brown, Paul Handrigan, Takashi Iwai
  Cc: kernel-janitors, LKML

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 22 Nov 2017 15:50:46 +0100

Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 sound/soc/codecs/cs42l73.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/sound/soc/codecs/cs42l73.c b/sound/soc/codecs/cs42l73.c
index 3df2c473ab88..978cfbbad408 100644
--- a/sound/soc/codecs/cs42l73.c
+++ b/sound/soc/codecs/cs42l73.c
@@ -1307,10 +1307,9 @@ static int cs42l73_i2c_probe(struct i2c_client *i2c_client,
 		pdata = devm_kzalloc(&i2c_client->dev,
 				     sizeof(struct cs42l73_platform_data),
 				GFP_KERNEL);
-		if (!pdata) {
-			dev_err(&i2c_client->dev, "could not allocate pdata\n");
+		if (!pdata)
 			return -ENOMEM;
-		}
+
 		if (i2c_client->dev.of_node) {
 			if (of_property_read_u32(i2c_client->dev.of_node,
 				"chgfreq", &val32) >= 0)
-- 
2.15.0

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 2/3] ASoC: cs42l73: Improve two size determinations in cs42l73_i2c_probe()
  2017-11-22 15:46 ` SF Markus Elfring
  (?)
@ 2017-11-22 15:49   ` SF Markus Elfring
  -1 siblings, 0 replies; 24+ messages in thread
From: SF Markus Elfring @ 2017-11-22 15:49 UTC (permalink / raw)
  To: alsa-devel, Brian Austin, Jaroslav Kysela, Liam Girdwood,
	Mark Brown, Paul Handrigan, Takashi Iwai
  Cc: LKML, kernel-janitors

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 22 Nov 2017 16:07:42 +0100

Replace the specification of two data structures by pointer dereferences
as the parameter for the operator "sizeof" to make the corresponding size
determination a bit safer according to the Linux coding style convention.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 sound/soc/codecs/cs42l73.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/sound/soc/codecs/cs42l73.c b/sound/soc/codecs/cs42l73.c
index 978cfbbad408..dde37e569ade 100644
--- a/sound/soc/codecs/cs42l73.c
+++ b/sound/soc/codecs/cs42l73.c
@@ -1289,8 +1289,7 @@ static int cs42l73_i2c_probe(struct i2c_client *i2c_client,
 	unsigned int reg;
 	u32 val32;
 
-	cs42l73 = devm_kzalloc(&i2c_client->dev, sizeof(struct cs42l73_private),
-			       GFP_KERNEL);
+	cs42l73 = devm_kzalloc(&i2c_client->dev, sizeof(*cs42l73), GFP_KERNEL);
 	if (!cs42l73)
 		return -ENOMEM;
 
@@ -1304,9 +1303,8 @@ static int cs42l73_i2c_probe(struct i2c_client *i2c_client,
 	if (pdata) {
 		cs42l73->pdata = *pdata;
 	} else {
-		pdata = devm_kzalloc(&i2c_client->dev,
-				     sizeof(struct cs42l73_platform_data),
-				GFP_KERNEL);
+		pdata = devm_kzalloc(&i2c_client->dev, sizeof(*pdata),
+				     GFP_KERNEL);
 		if (!pdata)
 			return -ENOMEM;
 
-- 
2.15.0

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 2/3] ASoC: cs42l73: Improve two size determinations in cs42l73_i2c_probe()
@ 2017-11-22 15:49   ` SF Markus Elfring
  0 siblings, 0 replies; 24+ messages in thread
From: SF Markus Elfring @ 2017-11-22 15:49 UTC (permalink / raw)
  To: alsa-devel, Brian Austin, Jaroslav Kysela, Liam Girdwood,
	Mark Brown, Paul Handrigan, Takashi Iwai
  Cc: kernel-janitors, LKML

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 22 Nov 2017 16:07:42 +0100

Replace the specification of two data structures by pointer dereferences
as the parameter for the operator "sizeof" to make the corresponding size
determination a bit safer according to the Linux coding style convention.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 sound/soc/codecs/cs42l73.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/sound/soc/codecs/cs42l73.c b/sound/soc/codecs/cs42l73.c
index 978cfbbad408..dde37e569ade 100644
--- a/sound/soc/codecs/cs42l73.c
+++ b/sound/soc/codecs/cs42l73.c
@@ -1289,8 +1289,7 @@ static int cs42l73_i2c_probe(struct i2c_client *i2c_client,
 	unsigned int reg;
 	u32 val32;
 
-	cs42l73 = devm_kzalloc(&i2c_client->dev, sizeof(struct cs42l73_private),
-			       GFP_KERNEL);
+	cs42l73 = devm_kzalloc(&i2c_client->dev, sizeof(*cs42l73), GFP_KERNEL);
 	if (!cs42l73)
 		return -ENOMEM;
 
@@ -1304,9 +1303,8 @@ static int cs42l73_i2c_probe(struct i2c_client *i2c_client,
 	if (pdata) {
 		cs42l73->pdata = *pdata;
 	} else {
-		pdata = devm_kzalloc(&i2c_client->dev,
-				     sizeof(struct cs42l73_platform_data),
-				GFP_KERNEL);
+		pdata = devm_kzalloc(&i2c_client->dev, sizeof(*pdata),
+				     GFP_KERNEL);
 		if (!pdata)
 			return -ENOMEM;
 
-- 
2.15.0


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 2/3] ASoC: cs42l73: Improve two size determinations in cs42l73_i2c_probe()
@ 2017-11-22 15:49   ` SF Markus Elfring
  0 siblings, 0 replies; 24+ messages in thread
From: SF Markus Elfring @ 2017-11-22 15:49 UTC (permalink / raw)
  To: alsa-devel, Brian Austin, Jaroslav Kysela, Liam Girdwood,
	Mark Brown, Paul Handrigan, Takashi Iwai
  Cc: kernel-janitors, LKML

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 22 Nov 2017 16:07:42 +0100

Replace the specification of two data structures by pointer dereferences
as the parameter for the operator "sizeof" to make the corresponding size
determination a bit safer according to the Linux coding style convention.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 sound/soc/codecs/cs42l73.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/sound/soc/codecs/cs42l73.c b/sound/soc/codecs/cs42l73.c
index 978cfbbad408..dde37e569ade 100644
--- a/sound/soc/codecs/cs42l73.c
+++ b/sound/soc/codecs/cs42l73.c
@@ -1289,8 +1289,7 @@ static int cs42l73_i2c_probe(struct i2c_client *i2c_client,
 	unsigned int reg;
 	u32 val32;
 
-	cs42l73 = devm_kzalloc(&i2c_client->dev, sizeof(struct cs42l73_private),
-			       GFP_KERNEL);
+	cs42l73 = devm_kzalloc(&i2c_client->dev, sizeof(*cs42l73), GFP_KERNEL);
 	if (!cs42l73)
 		return -ENOMEM;
 
@@ -1304,9 +1303,8 @@ static int cs42l73_i2c_probe(struct i2c_client *i2c_client,
 	if (pdata) {
 		cs42l73->pdata = *pdata;
 	} else {
-		pdata = devm_kzalloc(&i2c_client->dev,
-				     sizeof(struct cs42l73_platform_data),
-				GFP_KERNEL);
+		pdata = devm_kzalloc(&i2c_client->dev, sizeof(*pdata),
+				     GFP_KERNEL);
 		if (!pdata)
 			return -ENOMEM;
 
-- 
2.15.0

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 3/3] ASoC: cs42l73: Fix a typo in two comments
  2017-11-22 15:46 ` SF Markus Elfring
  (?)
@ 2017-11-22 15:50   ` SF Markus Elfring
  -1 siblings, 0 replies; 24+ messages in thread
From: SF Markus Elfring @ 2017-11-22 15:50 UTC (permalink / raw)
  To: alsa-devel, Brian Austin, Jaroslav Kysela, Liam Girdwood,
	Mark Brown, Paul Handrigan, Takashi Iwai
  Cc: LKML, kernel-janitors

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 22 Nov 2017 16:26:27 +0100

Add a missing character in these descriptions.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 sound/soc/codecs/cs42l73.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/sound/soc/codecs/cs42l73.c b/sound/soc/codecs/cs42l73.c
index dde37e569ade..928036eeb11f 100644
--- a/sound/soc/codecs/cs42l73.c
+++ b/sound/soc/codecs/cs42l73.c
@@ -763,7 +763,7 @@ static const struct snd_soc_dapm_route cs42l73_audio_map[] = {
 	{"ASPOUTL", "ASP-IP Volume", "ASPL Output Mixer"},
 	{"ASPOUTR", "ASP-IP Volume", "ASPR Output Mixer"},
 
-	/* Auxillary Capture */
+	/* Auxiliary Capture */
 	{"XSPL Output Mixer", NULL, "Input Left Capture"},
 	{"XSPR Output Mixer", NULL, "Input Right Capture"},
 
@@ -1127,9 +1127,8 @@ static int cs42l73_set_bias_level(struct snd_soc_codec *codec,
 			mdelay(cs42l73->shutdwn_delay);
 			cs42l73->shutdwn_delay = 0;
 		} else {
-			mdelay(15); /* Min amount of time requred to power
-				     * down.
-				     */
+			/* Min amount of time required to power down. */
+			mdelay(15);
 		}
 		snd_soc_update_bits(codec, CS42L73_DMMCC, CS42L73_MCLKDIS, 1);
 		break;
-- 
2.15.0

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 3/3] ASoC: cs42l73: Fix a typo in two comments
@ 2017-11-22 15:50   ` SF Markus Elfring
  0 siblings, 0 replies; 24+ messages in thread
From: SF Markus Elfring @ 2017-11-22 15:50 UTC (permalink / raw)
  To: alsa-devel, Brian Austin, Jaroslav Kysela, Liam Girdwood,
	Mark Brown, Paul Handrigan, Takashi Iwai
  Cc: kernel-janitors, LKML

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 22 Nov 2017 16:26:27 +0100

Add a missing character in these descriptions.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 sound/soc/codecs/cs42l73.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/sound/soc/codecs/cs42l73.c b/sound/soc/codecs/cs42l73.c
index dde37e569ade..928036eeb11f 100644
--- a/sound/soc/codecs/cs42l73.c
+++ b/sound/soc/codecs/cs42l73.c
@@ -763,7 +763,7 @@ static const struct snd_soc_dapm_route cs42l73_audio_map[] = {
 	{"ASPOUTL", "ASP-IP Volume", "ASPL Output Mixer"},
 	{"ASPOUTR", "ASP-IP Volume", "ASPR Output Mixer"},
 
-	/* Auxillary Capture */
+	/* Auxiliary Capture */
 	{"XSPL Output Mixer", NULL, "Input Left Capture"},
 	{"XSPR Output Mixer", NULL, "Input Right Capture"},
 
@@ -1127,9 +1127,8 @@ static int cs42l73_set_bias_level(struct snd_soc_codec *codec,
 			mdelay(cs42l73->shutdwn_delay);
 			cs42l73->shutdwn_delay = 0;
 		} else {
-			mdelay(15); /* Min amount of time requred to power
-				     * down.
-				     */
+			/* Min amount of time required to power down. */
+			mdelay(15);
 		}
 		snd_soc_update_bits(codec, CS42L73_DMMCC, CS42L73_MCLKDIS, 1);
 		break;
-- 
2.15.0


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 3/3] ASoC: cs42l73: Fix a typo in two comments
@ 2017-11-22 15:50   ` SF Markus Elfring
  0 siblings, 0 replies; 24+ messages in thread
From: SF Markus Elfring @ 2017-11-22 15:50 UTC (permalink / raw)
  To: alsa-devel, Brian Austin, Jaroslav Kysela, Liam Girdwood,
	Mark Brown, Paul Handrigan, Takashi Iwai
  Cc: kernel-janitors, LKML

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 22 Nov 2017 16:26:27 +0100

Add a missing character in these descriptions.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 sound/soc/codecs/cs42l73.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/sound/soc/codecs/cs42l73.c b/sound/soc/codecs/cs42l73.c
index dde37e569ade..928036eeb11f 100644
--- a/sound/soc/codecs/cs42l73.c
+++ b/sound/soc/codecs/cs42l73.c
@@ -763,7 +763,7 @@ static const struct snd_soc_dapm_route cs42l73_audio_map[] = {
 	{"ASPOUTL", "ASP-IP Volume", "ASPL Output Mixer"},
 	{"ASPOUTR", "ASP-IP Volume", "ASPR Output Mixer"},
 
-	/* Auxillary Capture */
+	/* Auxiliary Capture */
 	{"XSPL Output Mixer", NULL, "Input Left Capture"},
 	{"XSPR Output Mixer", NULL, "Input Right Capture"},
 
@@ -1127,9 +1127,8 @@ static int cs42l73_set_bias_level(struct snd_soc_codec *codec,
 			mdelay(cs42l73->shutdwn_delay);
 			cs42l73->shutdwn_delay = 0;
 		} else {
-			mdelay(15); /* Min amount of time requred to power
-				     * down.
-				     */
+			/* Min amount of time required to power down. */
+			mdelay(15);
 		}
 		snd_soc_update_bits(codec, CS42L73_DMMCC, CS42L73_MCLKDIS, 1);
 		break;
-- 
2.15.0

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* Re: [EXTERNAL] [PATCH 0/3] ASoC-cs42l73: Adjustments for two function implementations
  2017-11-22 15:46 ` SF Markus Elfring
  (?)
@ 2017-11-27 14:46   ` Brian Austin
  -1 siblings, 0 replies; 24+ messages in thread
From: Brian Austin @ 2017-11-27 14:46 UTC (permalink / raw)
  To: SF Markus Elfring
  Cc: alsa-devel, Brian Austin, Jaroslav Kysela, Liam Girdwood,
	Mark Brown, Paul Handrigan, Takashi Iwai, LKML, kernel-janitors

On Wed, 22 Nov 2017, SF Markus Elfring wrote:

> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Wed, 22 Nov 2017 16:38:32 +0100
> 
> Three update suggestions were taken into account
> from static source code analysis.
> 
> Markus Elfring (3):
>   Delete an error message for a failed memory allocation in cs42l73_i2c_probe()
>   Improve two size determinations in cs42l73_i2c_probe()
>   Fix a typo in two comments
> 
>  sound/soc/codecs/cs42l73.c | 20 ++++++++------------
>  1 file changed, 8 insertions(+), 12 deletions(-)
> 
> -- 
> 2.15.0
> 
> 
For the series, Thanks
Acked-by: Brian Austin <brian.austin@cirrus.com>

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [EXTERNAL] [PATCH 0/3] ASoC-cs42l73: Adjustments for two function implementations
@ 2017-11-27 14:46   ` Brian Austin
  0 siblings, 0 replies; 24+ messages in thread
From: Brian Austin @ 2017-11-27 14:46 UTC (permalink / raw)
  To: SF Markus Elfring
  Cc: Brian Austin, alsa-devel, LKML, Takashi Iwai, kernel-janitors,
	Liam Girdwood, Paul Handrigan, Mark Brown

On Wed, 22 Nov 2017, SF Markus Elfring wrote:

> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Wed, 22 Nov 2017 16:38:32 +0100
> 
> Three update suggestions were taken into account
> from static source code analysis.
> 
> Markus Elfring (3):
>   Delete an error message for a failed memory allocation in cs42l73_i2c_probe()
>   Improve two size determinations in cs42l73_i2c_probe()
>   Fix a typo in two comments
> 
>  sound/soc/codecs/cs42l73.c | 20 ++++++++------------
>  1 file changed, 8 insertions(+), 12 deletions(-)
> 
> -- 
> 2.15.0
> 
> 
For the series, Thanks
Acked-by: Brian Austin <brian.austin@cirrus.com>

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [EXTERNAL] [PATCH 0/3] ASoC-cs42l73: Adjustments for two function implementations
@ 2017-11-27 14:46   ` Brian Austin
  0 siblings, 0 replies; 24+ messages in thread
From: Brian Austin @ 2017-11-27 14:46 UTC (permalink / raw)
  To: SF Markus Elfring
  Cc: Brian Austin, alsa-devel, LKML, Takashi Iwai, kernel-janitors,
	Liam Girdwood, Paul Handrigan, Mark Brown

On Wed, 22 Nov 2017, SF Markus Elfring wrote:

> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Wed, 22 Nov 2017 16:38:32 +0100
> 
> Three update suggestions were taken into account
> from static source code analysis.
> 
> Markus Elfring (3):
>   Delete an error message for a failed memory allocation in cs42l73_i2c_probe()
>   Improve two size determinations in cs42l73_i2c_probe()
>   Fix a typo in two comments
> 
>  sound/soc/codecs/cs42l73.c | 20 ++++++++------------
>  1 file changed, 8 insertions(+), 12 deletions(-)
> 
> -- 
> 2.15.0
> 
> 
For the series, Thanks
Acked-by: Brian Austin <brian.austin@cirrus.com>

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 0/3] ASoC-cs42l73: Adjustments for two function implementations
  2017-11-22 15:46 ` SF Markus Elfring
  (?)
@ 2017-11-27 14:57   ` Brian Austin
  -1 siblings, 0 replies; 24+ messages in thread
From: Brian Austin @ 2017-11-27 14:57 UTC (permalink / raw)
  To: SF Markus Elfring
  Cc: alsa-devel, Brian Austin, Jaroslav Kysela, Liam Girdwood,
	Mark Brown, Paul Handrigan, Takashi Iwai, LKML, kernel-janitors

On Wed, 22 Nov 2017, SF Markus Elfring wrote:

> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Wed, 22 Nov 2017 16:38:32 +0100
> 
> Three update suggestions were taken into account
> from static source code analysis.
> 
> Markus Elfring (3):
>   Delete an error message for a failed memory allocation in cs42l73_i2c_probe()
>   Improve two size determinations in cs42l73_i2c_probe()
>   Fix a typo in two comments
> 
>  sound/soc/codecs/cs42l73.c | 20 ++++++++------------
>  1 file changed, 8 insertions(+), 12 deletions(-)
> 
> -- 
> 2.15.0
> 
> 
Sorry for the company notification that this is an external email. Very   
clever indeed

For the Series, Thanks
Acked-by: Brian Austin <brian.austin@cirrus.com>

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 0/3] ASoC-cs42l73: Adjustments for two function implementations
@ 2017-11-27 14:57   ` Brian Austin
  0 siblings, 0 replies; 24+ messages in thread
From: Brian Austin @ 2017-11-27 14:57 UTC (permalink / raw)
  To: SF Markus Elfring
  Cc: Brian Austin, alsa-devel, LKML, Takashi Iwai, kernel-janitors,
	Liam Girdwood, Paul Handrigan, Mark Brown

On Wed, 22 Nov 2017, SF Markus Elfring wrote:

> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Wed, 22 Nov 2017 16:38:32 +0100
> 
> Three update suggestions were taken into account
> from static source code analysis.
> 
> Markus Elfring (3):
>   Delete an error message for a failed memory allocation in cs42l73_i2c_probe()
>   Improve two size determinations in cs42l73_i2c_probe()
>   Fix a typo in two comments
> 
>  sound/soc/codecs/cs42l73.c | 20 ++++++++------------
>  1 file changed, 8 insertions(+), 12 deletions(-)
> 
> -- 
> 2.15.0
> 
> 
Sorry for the company notification that this is an external email. Very   
clever indeed

For the Series, Thanks
Acked-by: Brian Austin <brian.austin@cirrus.com>

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 0/3] ASoC-cs42l73: Adjustments for two function implementations
@ 2017-11-27 14:57   ` Brian Austin
  0 siblings, 0 replies; 24+ messages in thread
From: Brian Austin @ 2017-11-27 14:57 UTC (permalink / raw)
  To: SF Markus Elfring
  Cc: Brian Austin, alsa-devel, LKML, Takashi Iwai, kernel-janitors,
	Liam Girdwood, Paul Handrigan, Mark Brown

On Wed, 22 Nov 2017, SF Markus Elfring wrote:

> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Wed, 22 Nov 2017 16:38:32 +0100
> 
> Three update suggestions were taken into account
> from static source code analysis.
> 
> Markus Elfring (3):
>   Delete an error message for a failed memory allocation in cs42l73_i2c_probe()
>   Improve two size determinations in cs42l73_i2c_probe()
>   Fix a typo in two comments
> 
>  sound/soc/codecs/cs42l73.c | 20 ++++++++------------
>  1 file changed, 8 insertions(+), 12 deletions(-)
> 
> -- 
> 2.15.0
> 
> 
Sorry for the company notification that this is an external email. Very   
clever indeed

For the Series, Thanks
Acked-by: Brian Austin <brian.austin@cirrus.com>

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Applied "ASoC: cs42l73: Improve two size determinations in cs42l73_i2c_probe()" to the asoc tree
  2017-11-22 15:49   ` SF Markus Elfring
  (?)
@ 2017-11-27 18:53     ` Mark Brown
  -1 siblings, 0 replies; 24+ messages in thread
From: Mark Brown @ 2017-11-27 18:53 UTC (permalink / raw)
  To: Markus Elfring
  Cc: Mark Brown, alsa-devel, Brian Austin, Jaroslav Kysela,
	Liam Girdwood, Mark Brown, Paul Handrigan, Takashi Iwai,
	kernel-janitors, LKML, alsa-devel

The patch

   ASoC: cs42l73: Improve two size determinations in cs42l73_i2c_probe()

has been applied to the asoc tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From 68fa08c665e51b2fe100876692e57bca3aea7711 Mon Sep 17 00:00:00 2001
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 22 Nov 2017 16:07:42 +0100
Subject: [PATCH] ASoC: cs42l73: Improve two size determinations in
 cs42l73_i2c_probe()

Replace the specification of two data structures by pointer dereferences
as the parameter for the operator "sizeof" to make the corresponding size
determination a bit safer according to the Linux coding style convention.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/codecs/cs42l73.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/sound/soc/codecs/cs42l73.c b/sound/soc/codecs/cs42l73.c
index 978cfbbad408..dde37e569ade 100644
--- a/sound/soc/codecs/cs42l73.c
+++ b/sound/soc/codecs/cs42l73.c
@@ -1289,8 +1289,7 @@ static int cs42l73_i2c_probe(struct i2c_client *i2c_client,
 	unsigned int reg;
 	u32 val32;
 
-	cs42l73 = devm_kzalloc(&i2c_client->dev, sizeof(struct cs42l73_private),
-			       GFP_KERNEL);
+	cs42l73 = devm_kzalloc(&i2c_client->dev, sizeof(*cs42l73), GFP_KERNEL);
 	if (!cs42l73)
 		return -ENOMEM;
 
@@ -1304,9 +1303,8 @@ static int cs42l73_i2c_probe(struct i2c_client *i2c_client,
 	if (pdata) {
 		cs42l73->pdata = *pdata;
 	} else {
-		pdata = devm_kzalloc(&i2c_client->dev,
-				     sizeof(struct cs42l73_platform_data),
-				GFP_KERNEL);
+		pdata = devm_kzalloc(&i2c_client->dev, sizeof(*pdata),
+				     GFP_KERNEL);
 		if (!pdata)
 			return -ENOMEM;
 
-- 
2.15.0

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* Applied "ASoC: cs42l73: Improve two size determinations in cs42l73_i2c_probe()" to the asoc tree
@ 2017-11-27 18:53     ` Mark Brown
  0 siblings, 0 replies; 24+ messages in thread
From: Mark Brown @ 2017-11-27 18:53 UTC (permalink / raw)
  To: Markus Elfring
  Cc: Mark Brown, alsa-devel, Brian Austin, Jaroslav Kysela, Liam Girdwood

The patch

   ASoC: cs42l73: Improve two size determinations in cs42l73_i2c_probe()

has been applied to the asoc tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

From 68fa08c665e51b2fe100876692e57bca3aea7711 Mon Sep 17 00:00:00 2001
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 22 Nov 2017 16:07:42 +0100
Subject: [PATCH] ASoC: cs42l73: Improve two size determinations in
 cs42l73_i2c_probe()

Replace the specification of two data structures by pointer dereferences
as the parameter for the operator "sizeof" to make the corresponding size
determination a bit safer according to the Linux coding style convention.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/codecs/cs42l73.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/sound/soc/codecs/cs42l73.c b/sound/soc/codecs/cs42l73.c
index 978cfbbad408..dde37e569ade 100644
--- a/sound/soc/codecs/cs42l73.c
+++ b/sound/soc/codecs/cs42l73.c
@@ -1289,8 +1289,7 @@ static int cs42l73_i2c_probe(struct i2c_client *i2c_client,
 	unsigned int reg;
 	u32 val32;
 
-	cs42l73 = devm_kzalloc(&i2c_client->dev, sizeof(struct cs42l73_private),
-			       GFP_KERNEL);
+	cs42l73 = devm_kzalloc(&i2c_client->dev, sizeof(*cs42l73), GFP_KERNEL);
 	if (!cs42l73)
 		return -ENOMEM;
 
@@ -1304,9 +1303,8 @@ static int cs42l73_i2c_probe(struct i2c_client *i2c_client,
 	if (pdata) {
 		cs42l73->pdata = *pdata;
 	} else {
-		pdata = devm_kzalloc(&i2c_client->dev,
-				     sizeof(struct cs42l73_platform_data),
-				GFP_KERNEL);
+		pdata = devm_kzalloc(&i2c_client->dev, sizeof(*pdata),
+				     GFP_KERNEL);
 		if (!pdata)
 			return -ENOMEM;
 
-- 
2.15.0


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* Applied "ASoC: cs42l73: Improve two size determinations in cs42l73_i2c_probe()" to the asoc tree
@ 2017-11-27 18:53     ` Mark Brown
  0 siblings, 0 replies; 24+ messages in thread
From: Mark Brown @ 2017-11-27 18:53 UTC (permalink / raw)
  To: Markus Elfring
  Cc: Mark Brown, alsa-devel, Brian Austin, Jaroslav Kysela, Liam Girdwood

The patch

   ASoC: cs42l73: Improve two size determinations in cs42l73_i2c_probe()

has been applied to the asoc tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From 68fa08c665e51b2fe100876692e57bca3aea7711 Mon Sep 17 00:00:00 2001
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 22 Nov 2017 16:07:42 +0100
Subject: [PATCH] ASoC: cs42l73: Improve two size determinations in
 cs42l73_i2c_probe()

Replace the specification of two data structures by pointer dereferences
as the parameter for the operator "sizeof" to make the corresponding size
determination a bit safer according to the Linux coding style convention.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/codecs/cs42l73.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/sound/soc/codecs/cs42l73.c b/sound/soc/codecs/cs42l73.c
index 978cfbbad408..dde37e569ade 100644
--- a/sound/soc/codecs/cs42l73.c
+++ b/sound/soc/codecs/cs42l73.c
@@ -1289,8 +1289,7 @@ static int cs42l73_i2c_probe(struct i2c_client *i2c_client,
 	unsigned int reg;
 	u32 val32;
 
-	cs42l73 = devm_kzalloc(&i2c_client->dev, sizeof(struct cs42l73_private),
-			       GFP_KERNEL);
+	cs42l73 = devm_kzalloc(&i2c_client->dev, sizeof(*cs42l73), GFP_KERNEL);
 	if (!cs42l73)
 		return -ENOMEM;
 
@@ -1304,9 +1303,8 @@ static int cs42l73_i2c_probe(struct i2c_client *i2c_client,
 	if (pdata) {
 		cs42l73->pdata = *pdata;
 	} else {
-		pdata = devm_kzalloc(&i2c_client->dev,
-				     sizeof(struct cs42l73_platform_data),
-				GFP_KERNEL);
+		pdata = devm_kzalloc(&i2c_client->dev, sizeof(*pdata),
+				     GFP_KERNEL);
 		if (!pdata)
 			return -ENOMEM;
 
-- 
2.15.0

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* Applied "ASoC: cs42l73: Delete an error message for a failed memory allocation in cs42l73_i2c_probe()" to the asoc tree
  2017-11-22 15:48   ` [PATCH 1/3] ASoC: cs42l73: Delete an error message for a failed memory allocation in cs42l73_i2c_pro SF Markus Elfring
  (?)
@ 2017-11-27 18:53     ` Mark Brown
  -1 siblings, 0 replies; 24+ messages in thread
From: Mark Brown @ 2017-11-27 18:53 UTC (permalink / raw)
  To: Markus Elfring
  Cc: Mark Brown, alsa-devel, Brian Austin, Jaroslav Kysela,
	Liam Girdwood, Mark Brown, Paul Handrigan, Takashi Iwai,
	kernel-janitors, LKML, alsa-devel

The patch

   ASoC: cs42l73: Delete an error message for a failed memory allocation in cs42l73_i2c_probe()

has been applied to the asoc tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From ddedd797943df21a2464420744d117e930a43af8 Mon Sep 17 00:00:00 2001
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 22 Nov 2017 15:50:46 +0100
Subject: [PATCH] ASoC: cs42l73: Delete an error message for a failed memory
 allocation in cs42l73_i2c_probe()

Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/codecs/cs42l73.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/sound/soc/codecs/cs42l73.c b/sound/soc/codecs/cs42l73.c
index 3df2c473ab88..978cfbbad408 100644
--- a/sound/soc/codecs/cs42l73.c
+++ b/sound/soc/codecs/cs42l73.c
@@ -1307,10 +1307,9 @@ static int cs42l73_i2c_probe(struct i2c_client *i2c_client,
 		pdata = devm_kzalloc(&i2c_client->dev,
 				     sizeof(struct cs42l73_platform_data),
 				GFP_KERNEL);
-		if (!pdata) {
-			dev_err(&i2c_client->dev, "could not allocate pdata\n");
+		if (!pdata)
 			return -ENOMEM;
-		}
+
 		if (i2c_client->dev.of_node) {
 			if (of_property_read_u32(i2c_client->dev.of_node,
 				"chgfreq", &val32) >= 0)
-- 
2.15.0

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* Applied "ASoC: cs42l73: Delete an error message for a failed memory allocation in cs42l73_i2c_probe(
@ 2017-11-27 18:53     ` Mark Brown
  0 siblings, 0 replies; 24+ messages in thread
From: Mark Brown @ 2017-11-27 18:53 UTC (permalink / raw)
  To: Markus Elfring
  Cc: Mark Brown, alsa-devel, Brian Austin, Jaroslav Kysela, Liam Girdwood

The patch

   ASoC: cs42l73: Delete an error message for a failed memory allocation in cs42l73_i2c_probe()

has been applied to the asoc tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

From ddedd797943df21a2464420744d117e930a43af8 Mon Sep 17 00:00:00 2001
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 22 Nov 2017 15:50:46 +0100
Subject: [PATCH] ASoC: cs42l73: Delete an error message for a failed memory
 allocation in cs42l73_i2c_probe()

Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/codecs/cs42l73.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/sound/soc/codecs/cs42l73.c b/sound/soc/codecs/cs42l73.c
index 3df2c473ab88..978cfbbad408 100644
--- a/sound/soc/codecs/cs42l73.c
+++ b/sound/soc/codecs/cs42l73.c
@@ -1307,10 +1307,9 @@ static int cs42l73_i2c_probe(struct i2c_client *i2c_client,
 		pdata = devm_kzalloc(&i2c_client->dev,
 				     sizeof(struct cs42l73_platform_data),
 				GFP_KERNEL);
-		if (!pdata) {
-			dev_err(&i2c_client->dev, "could not allocate pdata\n");
+		if (!pdata)
 			return -ENOMEM;
-		}
+
 		if (i2c_client->dev.of_node) {
 			if (of_property_read_u32(i2c_client->dev.of_node,
 				"chgfreq", &val32) >= 0)
-- 
2.15.0


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* Applied "ASoC: cs42l73: Delete an error message for a failed memory allocation in cs42l73_i2c_probe()" to the asoc tree
@ 2017-11-27 18:53     ` Mark Brown
  0 siblings, 0 replies; 24+ messages in thread
From: Mark Brown @ 2017-11-27 18:53 UTC (permalink / raw)
  To: Markus Elfring
  Cc: Mark Brown, alsa-devel, Brian Austin, Jaroslav Kysela, Liam Girdwood

The patch

   ASoC: cs42l73: Delete an error message for a failed memory allocation in cs42l73_i2c_probe()

has been applied to the asoc tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From ddedd797943df21a2464420744d117e930a43af8 Mon Sep 17 00:00:00 2001
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 22 Nov 2017 15:50:46 +0100
Subject: [PATCH] ASoC: cs42l73: Delete an error message for a failed memory
 allocation in cs42l73_i2c_probe()

Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/codecs/cs42l73.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/sound/soc/codecs/cs42l73.c b/sound/soc/codecs/cs42l73.c
index 3df2c473ab88..978cfbbad408 100644
--- a/sound/soc/codecs/cs42l73.c
+++ b/sound/soc/codecs/cs42l73.c
@@ -1307,10 +1307,9 @@ static int cs42l73_i2c_probe(struct i2c_client *i2c_client,
 		pdata = devm_kzalloc(&i2c_client->dev,
 				     sizeof(struct cs42l73_platform_data),
 				GFP_KERNEL);
-		if (!pdata) {
-			dev_err(&i2c_client->dev, "could not allocate pdata\n");
+		if (!pdata)
 			return -ENOMEM;
-		}
+
 		if (i2c_client->dev.of_node) {
 			if (of_property_read_u32(i2c_client->dev.of_node,
 				"chgfreq", &val32) >= 0)
-- 
2.15.0

^ permalink raw reply related	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2017-11-27 18:53 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-22 15:46 [PATCH 0/3] ASoC-cs42l73: Adjustments for two function implementations SF Markus Elfring
2017-11-22 15:46 ` SF Markus Elfring
2017-11-22 15:46 ` SF Markus Elfring
2017-11-22 15:48 ` [PATCH 1/3] ASoC: cs42l73: Delete an error message for a failed memory allocation in cs42l73_i2c_probe() SF Markus Elfring
2017-11-22 15:48   ` SF Markus Elfring
2017-11-22 15:48   ` [PATCH 1/3] ASoC: cs42l73: Delete an error message for a failed memory allocation in cs42l73_i2c_pro SF Markus Elfring
2017-11-27 18:53   ` Applied "ASoC: cs42l73: Delete an error message for a failed memory allocation in cs42l73_i2c_probe()" to the asoc tree Mark Brown
2017-11-27 18:53     ` Mark Brown
2017-11-27 18:53     ` Applied "ASoC: cs42l73: Delete an error message for a failed memory allocation in cs42l73_i2c_probe( Mark Brown
2017-11-22 15:49 ` [PATCH 2/3] ASoC: cs42l73: Improve two size determinations in cs42l73_i2c_probe() SF Markus Elfring
2017-11-22 15:49   ` SF Markus Elfring
2017-11-22 15:49   ` SF Markus Elfring
2017-11-27 18:53   ` Applied "ASoC: cs42l73: Improve two size determinations in cs42l73_i2c_probe()" to the asoc tree Mark Brown
2017-11-27 18:53     ` Mark Brown
2017-11-27 18:53     ` Mark Brown
2017-11-22 15:50 ` [PATCH 3/3] ASoC: cs42l73: Fix a typo in two comments SF Markus Elfring
2017-11-22 15:50   ` SF Markus Elfring
2017-11-22 15:50   ` SF Markus Elfring
2017-11-27 14:46 ` [EXTERNAL] [PATCH 0/3] ASoC-cs42l73: Adjustments for two function implementations Brian Austin
2017-11-27 14:46   ` Brian Austin
2017-11-27 14:46   ` Brian Austin
2017-11-27 14:57 ` Brian Austin
2017-11-27 14:57   ` Brian Austin
2017-11-27 14:57   ` Brian Austin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.