Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp885393yba; Thu, 18 Apr 2019 11:11:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqy2GKYTh2RfS7J0vBWB1bm1PbGor7bfiog4asBeyrKZVERbHLBdYvPamTvzCBpZJycxmSG2 X-Received: by 2002:a63:d510:: with SMTP id c16mr4381237pgg.315.1555611091688; Thu, 18 Apr 2019 11:11:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555611091; cv=none; d=google.com; s=arc-20160816; b=nxZSZx44zlm0Rj46IIzrWFDkTufkn5mQdZKsWBbMLmSIs2Lv2HbIpGbzGk1kS4ubD9 OEFV2d86Ek2m35XdRCXg8XJEgPzuWZnuRwhu7XmER8lQOuN7S9MLhXAdt4DY9gD/5QVe Vp2aJHJqZMHHJF0CzjSHMAIPKOvYg6d5CtwMl2SGKyCnvZELC/m91xcSfLas3fypNDbO A/VeZ4c56/klohNmw0a5hW/CfcWG5iKlrUuI6GcQADZ5wowT844xyqauv1YPnhyKJnXD j9s7rstH8ZFIAmcnTCFRSAIYQGiXsXsm/o7Ff+UURrnenMRwF3iRguEUIjmynsZvNuYX V/PQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=L9KseZlAUQzLhCwCeibGVzRgqncMh/XXzqqxYNn5wTM=; b=EXJ6pzmalm/fQcf86Q5eYd+neBVYXYC4UuKGzLf0QRP0QmYmKxqEWzQvZRC8wcg/fs zhcn3F4FFKlEO/w0VshsgdekQ2+MBtMR82UCwIizZBw8+dbpw4p02UdpctTa5QgkPZXi +/hvCLgo835416GyVmYKuP03JGbJPu11RxyhjeTU8rlVUCO6kmZyimazm3GUIqa6bfK4 4ujEHW7KSIqDs/+zCqSUMcuyHl0gPCUeziOkclPEOhk7FpcnJxrBgbj1/8sTV8JHQkQJ /1np0dwLJflNxuZnJ2ZzbBnbtdMCsxjA1njzHQPtiW+q0BnHz+FMmR6zbE5BtVZFOomM zsHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=XxoFHAPR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d25si2616720pgb.229.2019.04.18.11.11.16; Thu, 18 Apr 2019 11:11:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=XxoFHAPR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391631AbfDRSJk (ORCPT + 99 others); Thu, 18 Apr 2019 14:09:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:41278 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391431AbfDRSJh (ORCPT ); Thu, 18 Apr 2019 14:09:37 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D16CE21872; Thu, 18 Apr 2019 18:09:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1555610977; bh=nogilSUF5E56CMWrVKlOeHpIEupOKB/TMUJXYz1NinQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XxoFHAPR2w9gMW7gSXeDzbutc1z+bd5gi51oWlxJPA01cDttGs4/THAGbZtAF+APM dAG3/RLfCaMaFeCO0bfXrmgS9GpLAhEEK/hHdYZRETepgPDGypNaKFsYFso1vO5Tcl FxcCJ56TO3ZCEGanxh6jE9tGOWLowPV8o3JtSCCI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Geert Uytterhoeven , Andy Shevchenko , Miguel Ojeda , Sasha Levin Subject: [PATCH 5.0 12/93] auxdisplay: hd44780: Fix memory leak on ->remove() Date: Thu, 18 Apr 2019 19:56:50 +0200 Message-Id: <20190418160438.125756125@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190418160436.781762249@linuxfoundation.org> References: <20190418160436.781762249@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit 41c8d0adf3c4df1867d98cee4a2c4531352a33ad ] We have to free on ->remove() the allocated resources on ->probe(). Fixes: d47d88361fee ("auxdisplay: Add HD44780 Character LCD support") Reviewed-by: Geert Uytterhoeven Signed-off-by: Andy Shevchenko Signed-off-by: Miguel Ojeda Signed-off-by: Sasha Levin --- drivers/auxdisplay/hd44780.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/auxdisplay/hd44780.c b/drivers/auxdisplay/hd44780.c index 9ad93ea42fdc..3cde351fb5c9 100644 --- a/drivers/auxdisplay/hd44780.c +++ b/drivers/auxdisplay/hd44780.c @@ -280,6 +280,8 @@ static int hd44780_remove(struct platform_device *pdev) struct charlcd *lcd = platform_get_drvdata(pdev); charlcd_unregister(lcd); + + kfree(lcd); return 0; } -- 2.19.1