Skip to contentSkip to conversation

+ drivers-rtc-rtc-pl031c-pass-correct-pointer-to-free_irq.patch added to -mm tree

PATCH [email protected] 1 participant 1 message May 20, 2013

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

Subject: + drivers-rtc-rtc-pl031c-pass-correct-pointer-to-free_irq.patch added to -mm tree
To: [email protected],[email protected],[email protected]
From: [email protected]
Date: Mon, 20 May 2013 15:41:07 -0700

The patch titled
Subject: drivers/rtc/rtc-pl031.c: pass correct pointer to free_irq()
has been added to the -mm tree. Its filename is
drivers-rtc-rtc-pl031c-pass-correct-pointer-to-free_irq.patch

Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated there every 3-4 working days

------------------------------------------------------
From: Lars-Peter Clausen <[email protected]>
Subject: drivers/rtc/rtc-pl031.c: pass correct pointer to free_irq()

free_irq() expects the same pointer that was passed to request_irq(), otherwise the IRQ is not freed.

The issue was found using the following coccinelle script:

<smpl>
@r1@
type T;
T devid;
@@
request_irq(..., devid)

@r2@
type r1.T;
T devid;
position p;
@@
free_irq@p(..., devid)

@@
position p != r2.p;
@@
*free_irq@p(...)
</smpl>

---

 drivers/rtc/rtc-pl031.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rtc/rtc-pl031.c renamed from drivers/rtc/rtc-pl031.c~drivers-rtc-rtc-pl031c-pass-correct-pointer-to-free_irq +1 -1
diff -puN drivers/rtc/rtc-pl031.c~drivers-rtc-rtc-pl031c-pass-correct-pointer-to-free_irq drivers/rtc/rtc-pl031.c
@@ -306,7 +306,7 @@ static int pl031_remove(struct amba_devi
 	struct pl031_local *ldata = dev_get_drvdata(&adev->dev);
 
 	amba_set_drvdata(adev, NULL);
-	free_irq(adev->irq[0], ldata->rtc);
+	free_irq(adev->irq[0], ldata);
 	rtc_device_unregister(ldata->rtc);
 	iounmap(ldata->base);
 	kfree(ldata);

_

Patches currently in -mm which might be from [email protected] are

linux-next.patch drivers-rtc-rtc-pl031c-pass-correct-pointer-to-free_irq.patch rtc-rtc-ab3100-remove-unnecessary-platform_set_drvdata.patch