From patchwork Tue Sep 24 02:35:50 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 2931321 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E89369F2B8 for ; Tue, 24 Sep 2013 02:35:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 63FAE203D9 for ; Tue, 24 Sep 2013 02:35:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2D737203B4 for ; Tue, 24 Sep 2013 02:35:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752837Ab3IXCfw (ORCPT ); Mon, 23 Sep 2013 22:35:52 -0400 Received: from mail-bk0-f45.google.com ([209.85.214.45]:44412 "EHLO mail-bk0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752503Ab3IXCfv (ORCPT ); Mon, 23 Sep 2013 22:35:51 -0400 Received: by mail-bk0-f45.google.com with SMTP id mx11so1497394bkb.32 for ; Mon, 23 Sep 2013 19:35:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=EC3scnEi9QCv2v/Wd337Wnw9uJIqk/TwLhBrV9YGqis=; b=s6/rwD/R1s5+MuZ3flZCfJVvclM1JPfN58k5O1L9riZDfewYbv0qzdmvY8b7OT2dA6 Afb1vr2JY2D5Za+8ASXk3TyRElTF0R0mdSeLNRvdKaDgCnxmLHaAnolRh/pch7eHcns0 vvUPzXtqVnH2UUdhpiighwt+W2eGucSscfJzAtO1McI7GxdaSH4oaxb9J4bmu25Jf6s9 kyC52W8i/nopnrji+Jetth2wgBaSVSapmW0lfQKIQWhIfPBGiwZcB6axQOLiQu4JkRg0 SS5k5S8ouowm1xKpQ1GJ1OnsL3hEzS5XH68V+L/3/3NYomPTOoQ+VB6BNBCW4EsXuA+f 17Mg== MIME-Version: 1.0 X-Received: by 10.204.69.12 with SMTP id x12mr20173779bki.12.1379990150787; Mon, 23 Sep 2013 19:35:50 -0700 (PDT) Received: by 10.205.13.74 with HTTP; Mon, 23 Sep 2013 19:35:50 -0700 (PDT) Date: Tue, 24 Sep 2013 10:35:50 +0800 Message-ID: Subject: [PATCH] [media] marvell-ccic: drop free_irq for devm_request_irq allocated irq From: Wei Yongjun To: corbet@lwn.net, m.chehab@samsung.com Cc: yongjun_wei@trendmicro.com.cn, linux-media@vger.kernel.org Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-9.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Wei Yongjun irq allocated with devm_request_irq should not be freed using free_irq, because doing so causes a dangling pointer, and a subsequent double free. Signed-off-by: Wei Yongjun Acked-by: Jonathan Corbet --- drivers/media/platform/marvell-ccic/mmp-driver.c | 1 - 1 file changed, 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/media/platform/marvell-ccic/mmp-driver.c b/drivers/media/platform/marvell-ccic/mmp-driver.c index b5a19af..3458fa0 100644 --- a/drivers/media/platform/marvell-ccic/mmp-driver.c +++ b/drivers/media/platform/marvell-ccic/mmp-driver.c @@ -481,7 +481,6 @@ static int mmpcam_remove(struct mmp_camera *cam) struct mmp_camera_platform_data *pdata; mmpcam_remove_device(cam); - free_irq(cam->irq, mcam); mccic_shutdown(mcam); mmpcam_power_down(mcam); pdata = cam->pdev->dev.platform_data;