From patchwork Wed Jun 5 17:29:56 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Goode X-Patchwork-Id: 2671771 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 7A37C3FD4F for ; Wed, 5 Jun 2013 17:30:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756869Ab3FERaK (ORCPT ); Wed, 5 Jun 2013 13:30:10 -0400 Received: from mail-lb0-f174.google.com ([209.85.217.174]:56104 "EHLO mail-lb0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756721Ab3FERaJ (ORCPT ); Wed, 5 Jun 2013 13:30:09 -0400 Received: by mail-lb0-f174.google.com with SMTP id x10so121297lbi.5 for ; Wed, 05 Jun 2013 10:30:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer; bh=7cYEpg4B4m84QSnUg+6IwLqjBm8NzVhGBeGQlC/B91M=; b=kBptz4AreQEeIGsRl8qQGgYeIXMBTTAs2vdjrfzPASu4i98QtuUk1j47k+Z/I67Vlc Vlg1L+NnJIwArEDzcXOf+C1dtJlrLAjnmhr7/ARANO/pf5qMiP4JZY2+fS6UfbObHdw4 1cyooM8JQ7l/MEzFLfdNSui//KMnIJ90+OWSg09hb8qsL82xDHZ/AOnkOWDtoPuFkNsr +eO45iqtVi+tjVlQ3/jMVef0EGVP1oiZ1hVtKPiXFO0anbUb6t8lXp5efwcSZskwPqUw 8RLKWGLFhH1X3Y5+cSdCj4VP12DU0TdfeB9GYS0VQ62dxN6RTWsGfW2Gg+3X08jAJ238 HYDQ== X-Received: by 10.112.34.104 with SMTP id y8mr6150259lbi.109.1370453407030; Wed, 05 Jun 2013 10:30:07 -0700 (PDT) Received: from localhost.localdomain (c193-14-104-184.cust.tele2.se. [193.14.104.184]) by mx.google.com with ESMTPSA id oi3sm14014599lbb.6.2013.06.05.10.30.05 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 05 Jun 2013 10:30:06 -0700 (PDT) From: Emil Goode To: archit@ti.com, axel.lin@gmail.com Cc: linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Emil Goode Subject: [PATCH] OMAPDSS: Remove kfree for memory allocated with devm_kzalloc Date: Wed, 5 Jun 2013 19:29:56 +0200 Message-Id: <1370453396-18043-1-git-send-email-emilgoode@gmail.com> X-Mailer: git-send-email 1.7.10.4 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org It's not necessary to free memory allocated with devm_kzalloc in a remove function and using kfree leads to a double free. Signed-off-by: Emil Goode --- drivers/video/omap2/displays/panel-picodlp.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/video/omap2/displays/panel-picodlp.c b/drivers/video/omap2/displays/panel-picodlp.c index 62f2db0..859e111 100644 --- a/drivers/video/omap2/displays/panel-picodlp.c +++ b/drivers/video/omap2/displays/panel-picodlp.c @@ -469,8 +469,6 @@ static void picodlp_panel_remove(struct omap_dss_device *dssdev) i2c_unregister_device(picod->picodlp_i2c_client); dev_set_drvdata(&dssdev->dev, NULL); dev_dbg(&dssdev->dev, "removing picodlp panel\n"); - - kfree(picod); } static int picodlp_panel_enable(struct omap_dss_device *dssdev)