Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755150Ab3EUDxk (ORCPT ); Mon, 20 May 2013 23:53:40 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:58438 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751262Ab3EUDxi convert rfc822-to-8bit (ORCPT ); Mon, 20 May 2013 23:53:38 -0400 X-AuditID: cbfee691-b7fef6d000002d62-a2-519aefc01403 MIME-version: 1.0 Content-type: text/plain; charset=UTF-8 Content-transfer-encoding: 8BIT Message-id: <519AEFC3.1080004@samsung.com> Date: Tue, 21 May 2013 12:53:39 +0900 From: =?UTF-8?B?6rmA7Iq57Jqw?= Reply-to: sw0312.kim@samsung.com User-Agent: Mozilla/5.0 (X11; Linux i686; rv:16.0) Gecko/20121011 Thunderbird/16.0.1 To: Lars-Peter Clausen , Inki Dae Cc: Joonyoung Shim , Kyungmin Park , David Airlie , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Seung-Woo Kim Subject: Re: [PATCH] drm/exynos: exynos_hdmi: Pass correct pointer to free_irq() References: <1369071126-7020-1-git-send-email-lars@metafoo.de> In-reply-to: <1369071126-7020-1-git-send-email-lars@metafoo.de> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrBIsWRmVeSWpSXmKPExsWyRsSkSPfg+1mBBlvfMFv0njvJZHHl63s2 i0n3J7BYvLh3kcXibNMbdoslk+ezWlzeNYfNYsbkl2wOHB7bvz1g9bjffZzJY8mbQ6wefVtW MXp83iQXwBrFZZOSmpNZllqkb5fAlXHh7jm2gpucFTdm7GJpYHzA3sXIySEhYCKxunUXM4Qt JnHh3nq2LkYuDiGBpYwS19a0McEUzZgzkRUiMZ1RouXEBDaQBK+AoMSPyfdYQGxmAXWJSfMW MUPYIhK/bs2EimtLLFv4mhmi+QWjxIG9axghmrUkPnY3gTWwCKhKtJ08BBZnEzCX6Px4CWyB kICCxJWJx4BO5eAQFQiT2L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YzgmH8mtYNxZYPFIUYBDkYlHl4Bw1mBQqyJZcWVuYcYJTiYlUR4vzcDhXhTEiurUovy 44tKc1KLDzEmAz06kVlKNDkfmI7ySuINjU3MjCyNzA0tjIzNSRNWEuc90GodKCSQnliSmp2a WpBaBLOFiYNTqoGR4Yvtjn+dDedeHhWcWrLNt/oAO5f23pM/8nXSzk1OtHjqMLdab0e8wYE9 WVLrX7+TLpaf7HR6+0azH1r3jm8KvaF2w2n59+PTry10Vn4+hTXpnD8To0Ivm6PZPpvrT24I pT75k/tk3Y2di6Qe7X+hYd24032F1tu4t2y2v1LPW1XLfNWZ0vyhQImlOCPRUIu5qDgRAPui S8o9AwAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1410 Lines: 61 Good point, On 2013년 05월 21일 02:32, Lars-Peter Clausen wrote: > 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 */ > -- Seung-Woo Kim Samsung Software R&D Center -- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/