Skip to contentSkip to conversation

ARM: S3C64XX: Fix fallthrough bug in i2sv3 gpio configuration, improve logging

PATCH Applied Dimitris Papastamos 3 participants 4 messages Aug 26, 2010 – Aug 27, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: S3C64XX: Fix fallthrough bug in i2sv3 gpio configuration, improve logging

If the platform device id is 1, the code will fallthrough the case and incorrectly return -EINVAL. Add a break to avoid fallthrough.

Make logging slightly more verbose by including the device id.

This is a fix for a change in ASoC multi-component as well.

---
 arch/arm/mach-s3c64xx/dev-audio.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
arch/arm/mach-s3c64xx/dev-audio.c +5 -2
index f094258..3838335 100644
@@ -43,8 +43,10 @@ static int s3c64xx_i2sv3_cfg_gpio(struct platform_device *pdev)
 		s3c_gpio_cfgpin(S3C64XX_GPE(2), S3C64XX_GPE2_I2S1_LRCLK);
 		s3c_gpio_cfgpin(S3C64XX_GPE(3), S3C64XX_GPE3_I2S1_DI);
 		s3c_gpio_cfgpin(S3C64XX_GPE(4), S3C64XX_GPE4_I2S1_D0);
+		break;
 	default:
-		printk(KERN_DEBUG "Invalid I2S Controller number!");
+		printk(KERN_DEBUG "Invalid I2S Controller number: %d\n",
+			pdev->id);
 		return -EINVAL;
 	}
 
@@ -184,7 +186,8 @@ static int s3c64xx_pcm_cfg_gpio(struct platform_device *pdev)
 		s3c_gpio_cfgpin(S3C64XX_GPE(4), S3C64XX_GPE4_PCM1_SOUT);
 		break;
 	default:
-		printk(KERN_DEBUG "Invalid PCM Controller number!");
+		printk(KERN_DEBUG "Invalid PCM Controller number: %d\n",
+			pdev->id);
 		return -EINVAL;
 	}
 
Signature · 1 line
1.7.2.2
#1 lore raw
Quoted 1 line · Dimitris Papastamos

This is a fix for a change in ASoC multi-component as well.

Clarifying from offline discussion: the issue isn't present in mainline, it came in with m-c.

Acked-by
#2 lore raw
Quoted 6 lines · Mark Brown
Quoted 1 line · Dimitris Papastamos

This is a fix for a change in ASoC multi-component as well.

Clarifying from offline discussion: the issue isn't present in mainline, it came in with m-c.

Signature · 3 lines
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk
Applied
#3 lore raw
Quoted 9 lines · Liam Girdwood
Quoted 6 lines · Mark Brown
Quoted 1 line · Dimitris Papastamos

This is a fix for a change in ASoC multi-component as well.

Clarifying from offline discussion: the issue isn't present in mainline, it came in with m-c.

Applied, thanks.