From patchwork Mon May 20 17:32:06 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lars-Peter Clausen X-Patchwork-Id: 2594481 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id 078583FD4E for ; Mon, 20 May 2013 17:42:00 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D2719E60C6 for ; Mon, 20 May 2013 10:41:59 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org X-Greylist: delayed 563 seconds by postgrey-1.32 at gabe; Mon, 20 May 2013 10:41:47 PDT Received: from smtp-out-240.synserver.de (smtp-out-242.synserver.de [212.40.185.242]) by gabe.freedesktop.org (Postfix) with ESMTP id A6FDEE601E for ; Mon, 20 May 2013 10:41:47 -0700 (PDT) Received: (qmail 25854 invoked by uid 0); 20 May 2013 17:32:22 -0000 X-SynServer-TrustedSrc: 1 X-SynServer-AuthUser: lars@metafoo.de X-SynServer-PPID: 25794 Received: from ppp-188-174-66-218.dynamic.mnet-online.de (HELO lars-adi-laptop.fritz.box) [188.174.66.218] by 217.119.54.87 with SMTP; 20 May 2013 17:32:22 -0000 From: Lars-Peter Clausen To: Inki Dae , Joonyoung Shim , Seung-Woo Kim , Kyungmin Park , David Airlie Subject: [PATCH] drm/exynos: exynos_hdmi: Pass correct pointer to free_irq() Date: Mon, 20 May 2013 19:32:06 +0200 Message-Id: <1369071126-7020-1-git-send-email-lars@metafoo.de> X-Mailer: git-send-email 1.8.0 Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org free_irq() expects the same pointer that was passed to request_threaded_irq(), otherwise the IRQ is not freed. The issue was found using the following coccinelle script: @r1@ type T; T devid; @@ request_threaded_irq(..., devid) @r2@ type r1.T; T devid; position p; @@ free_irq@p(..., devid) @@ position p != r2.p; @@ *free_irq@p(...) Signed-off-by: Lars-Peter Clausen Acked-by: Seung-Woo Kim --- drivers/gpu/drm/exynos/exynos_hdmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c index bbfc384..7e99853 100644 --- a/drivers/gpu/drm/exynos/exynos_hdmi.c +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c @@ -2082,7 +2082,7 @@ static int hdmi_remove(struct platform_device *pdev) pm_runtime_disable(dev); - free_irq(hdata->irq, hdata); + free_irq(hdata->irq, ctx); /* hdmiphy i2c driver */