Skip to contentSkip to conversation

regulator: Fix warning with CONFIG_BUG disabled

PATCH Applied Mark Brown 2 participants 2 messages Feb 2, 2011 – Feb 3, 2011

Subsystems (2)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 regulator: Fix warning with CONFIG_BUG disabled

---
 drivers/regulator/wm831x-dcdc.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/regulator/wm831x-dcdc.c +1 -0
index 8b0d2c4..06df898 100644
@@ -120,6 +120,7 @@ static unsigned int wm831x_dcdc_get_mode(struct regulator_dev *rdev)
 		return REGULATOR_MODE_IDLE;
 	default:
 		BUG();
+		return -EINVAL;
 	}
 }
 
Signature · 1 line
1.7.2.3
#1 lore raw
Quoted 10 lines · Mark Brown
---
 drivers/regulator/wm831x-dcdc.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/regulator/wm831x-dcdc.c +0 -0
index 8b0d2c4..06df898 100644

drivers/regulator/wm831x-dcdc.c static unsigned int wm831x_dcdc_get_mode(struct regulator_dev *rdev) · line 126

Quoted 7 lines
drivers/regulator/wm831x-dcdc.c +1 -0
@@ -120,6 +120,7 @@ static unsigned int wm831x_dcdc_get_mode(struct regulator_dev *rdev)
 		return REGULATOR_MODE_IDLE;
 	default:
 		BUG();
+		return -EINVAL;
 	}
 }
 

Applied.

Thanks

Liam

Signature · 3 lines
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk