Skip to contentSkip to conversation

pinctrl: cy8c95x0: Avoid returning positive values to user space

PATCH In review Andy Shevchenko 2 participants 5 messages Feb 27 – Mar 10

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

PATCH 1/1 pinctrl: cy8c95x0: Avoid returning positive values to user space

When probe fails due to unclear interrupt status register, it returns a positive number instead of the proper error code. Fix this accordingly.

---
 drivers/pinctrl/pinctrl-cy8c95x0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/pinctrl-cy8c95x0.c +1 -1
index 0d295ebc33d1..ace0be5ec679 100644
@@ -1300,7 +1300,7 @@ static int cy8c95x0_irq_setup(struct cy8c95x0_pinctrl *chip, int irq)
 	/* Read IRQ status register to clear all pending interrupts */
 	ret = cy8c95x0_irq_pending(chip, pending_irqs);
 	if (ret)
-		return dev_err_probe(dev, ret, "failed to clear irq status register\n");
+		return dev_err_probe(dev, -EBUSY, "failed to clear irq status register\n");
 
 	/* Mask all interrupts */
 	bitmap_fill(chip->irq_mask, MAX_LINE);
Signature · 1 line
2.50.1
#1 lore raw
Quoted 2 lines · Andy Shevchenko

When probe fails due to unclear interrupt status register, it returns a positive number instead of the proper error code. Fix this accordingly.

Note, for backporting this should be transformed to

- return ret;
+ return -EBUSY;

in the respective lines.

Signature · 2 lines
With Best Regards,
Andy Shevchenko
maintainer
#2 lore raw
In reply to Andy Shevchenko
Quoted 8 lines · Andy Shevchenko

When probe fails due to unclear interrupt status register, it returns a positive number instead of the proper error code. Fix this accordingly.

Patch applied for fixes!

Yours,
Linus Walleij

maintainer
#3 lore raw
Quoted 6 lines · Linus Walleij
Quoted 3 lines · Andy Shevchenko

When probe fails due to unclear interrupt status register, it returns a positive number instead of the proper error code. Fix this accordingly.

Quoted 7 lines
Quoted 5 lines

Patch applied for fixes!

Or no, for next actually, it doesn't apply to fixes... noticed after applying to next.

Yours,
Linus Walleij

#4 lore raw
Quoted 13 lines · Linus Walleij
Quoted 12 lines · Linus Walleij
Quoted 8 lines · Andy Shevchenko

When probe fails due to unclear interrupt status register, it returns a positive number instead of the proper error code. Fix this accordingly.

Quoted 4 lines
Quoted 1 line

Patch applied for fixes!

Or no, for next actually, it doesn't apply to fixes... noticed after applying to next.

Thanks!

Yes, I replied to it with explanation that for backporting the patch should be modified.

Signature · 2 lines
With Best Regards,
Andy Shevchenko