All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] wm831x_power: Fix off-by-one at free_irq()
@ 2015-06-14 11:55 Takeshi Yoshimura
  2015-06-14 13:24 ` Charles Keepax
  2015-06-15 10:32 ` Sebastian Reichel
  0 siblings, 2 replies; 3+ messages in thread
From: Takeshi Yoshimura @ 2015-06-14 11:55 UTC (permalink / raw)
  To: Sebastian Reichel, Dmitry Eremin-Solenikov, David Woodhouse,
	patches, linux-pm
  Cc: linux-kernel, Takeshi Yoshimura

An error handling in wm831x_power_probe() mistakenly frees a failed-to-
request irq as well as other irqs. I added missing decrement of the loop
counter.

Signed-off-by: Takeshi Yoshimura <yos@sslab.ics.keio.ac.jp>
---
 drivers/power/wm831x_power.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/power/wm831x_power.c b/drivers/power/wm831x_power.c
index 0161bda..db11ae6 100644
--- a/drivers/power/wm831x_power.c
+++ b/drivers/power/wm831x_power.c
@@ -609,6 +609,7 @@ static int wm831x_power_probe(struct platform_device *pdev)
 	return ret;
 
 err_bat_irq:
+	--i;
 	for (; i >= 0; i--) {
 		irq = platform_get_irq_byname(pdev, wm831x_bat_irqs[i]);
 		free_irq(irq, power);
-- 
1.9.1


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

* Re: [PATCH 1/1] wm831x_power: Fix off-by-one at free_irq()
  2015-06-14 11:55 [PATCH 1/1] wm831x_power: Fix off-by-one at free_irq() Takeshi Yoshimura
@ 2015-06-14 13:24 ` Charles Keepax
  2015-06-15 10:32 ` Sebastian Reichel
  1 sibling, 0 replies; 3+ messages in thread
From: Charles Keepax @ 2015-06-14 13:24 UTC (permalink / raw)
  To: Takeshi Yoshimura
  Cc: Sebastian Reichel, Dmitry Eremin-Solenikov, David Woodhouse,
	patches, linux-pm, linux-kernel

On Sun, Jun 14, 2015 at 08:55:18PM +0900, Takeshi Yoshimura wrote:
> An error handling in wm831x_power_probe() mistakenly frees a failed-to-
> request irq as well as other irqs. I added missing decrement of the loop
> counter.
> 
> Signed-off-by: Takeshi Yoshimura <yos@sslab.ics.keio.ac.jp>
> ---

Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

Thanks,
Charles

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

* Re: [PATCH 1/1] wm831x_power: Fix off-by-one at free_irq()
  2015-06-14 11:55 [PATCH 1/1] wm831x_power: Fix off-by-one at free_irq() Takeshi Yoshimura
  2015-06-14 13:24 ` Charles Keepax
@ 2015-06-15 10:32 ` Sebastian Reichel
  1 sibling, 0 replies; 3+ messages in thread
From: Sebastian Reichel @ 2015-06-15 10:32 UTC (permalink / raw)
  To: Takeshi Yoshimura
  Cc: Dmitry Eremin-Solenikov, David Woodhouse, patches, linux-pm,
	linux-kernel

[-- Attachment #1: Type: text/plain, Size: 264 bytes --]

Hi,

On Sun, Jun 14, 2015 at 08:55:18PM +0900, Takeshi Yoshimura wrote:
> An error handling in wm831x_power_probe() mistakenly frees a failed-to-
> request irq as well as other irqs. I added missing decrement of the loop
> counter.

Thanks, applied.

-- Sebastian

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

end of thread, other threads:[~2015-06-15 10:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-14 11:55 [PATCH 1/1] wm831x_power: Fix off-by-one at free_irq() Takeshi Yoshimura
2015-06-14 13:24 ` Charles Keepax
2015-06-15 10:32 ` Sebastian Reichel

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.