Skip to contentSkip to conversation

mfd: pm8921: fixup probe() error path when irq invalid

PATCH In review Josh Cartwright 3 participants 3 messages Mar 5, 2014 – Mar 6, 2014

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

PATCH 1/1 mfd: pm8921: fixup probe() error path when irq invalid

platform_get_irq() returns a negative error code when an IRQ is invalid or unspecified. Make 'irq' signed to properly handle this.

---
 drivers/mfd/pm8921-core.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/mfd/pm8921-core.c +1 -2
index 3aab6ac..d48452d 100644
@@ -403,9 +403,8 @@ static int pm8921_probe(struct platform_device *pdev)
 {
 	struct pm8921 *pmic;
 	struct regmap *regmap;
-	int rc;
+	int irq, rc;
 	unsigned int val;
-	unsigned int irq;
 	u32 rev;
 	struct pm_irq_chip *chip;
 	unsigned int nirqs = PM8921_NR_IRQS;
Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
Reviewed-by on v1 1/1
#1 lore raw
Quoted 3 lines · Josh Cartwright

platform_get_irq() returns a negative error code when an IRQ is invalid or unspecified. Make 'irq' signed to properly handle this.

Thanks

Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
#2 lore raw
In reply to Josh Cartwright
Quoted 8 lines

platform_get_irq() returns a negative error code when an IRQ is invalid or unspecified. Make 'irq' signed to properly handle this.

---
 drivers/mfd/pm8921-core.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Applied thanks.

Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog