From patchwork Fri Apr 1 14:23:47 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 681471 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p31EOmlv029060 for ; Fri, 1 Apr 2011 14:24:49 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757049Ab1DAOYC (ORCPT ); Fri, 1 Apr 2011 10:24:02 -0400 Received: from mgw2.diku.dk ([130.225.96.92]:35660 "EHLO mgw2.diku.dk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751813Ab1DAOYB (ORCPT ); Fri, 1 Apr 2011 10:24:01 -0400 Received: from localhost (localhost [127.0.0.1]) by mgw2.diku.dk (Postfix) with ESMTP id A8C5919BCCA; Fri, 1 Apr 2011 16:24:00 +0200 (CEST) Received: from mgw2.diku.dk ([127.0.0.1]) by localhost (mgw2.diku.dk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 14282-19; Fri, 1 Apr 2011 16:23:57 +0200 (CEST) Received: from palace.topps.diku.dk (palace.ekstranet.diku.dk [192.38.115.202]) by mgw2.diku.dk (Postfix) with ESMTP id 3E0B119BCDD; Fri, 1 Apr 2011 16:19:29 +0200 (CEST) From: Julia Lawall To: Paul Mundt Cc: kernel-janitors@vger.kernel.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 6/6] drivers/video/bfin-lq035q1-fb.c: introduce missing kfree Date: Fri, 1 Apr 2011 16:23:47 +0200 Message-Id: <1301667827-20056-6-git-send-email-julia@diku.dk> X-Mailer: git-send-email 1.7.1 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Fri, 01 Apr 2011 14:24:49 +0000 (UTC) Acked-by: Mike Frysinger diff --git a/drivers/video/bfin-lq035q1-fb.c b/drivers/video/bfin-lq035q1-fb.c index c8e1f04..23b6c4b 100644 --- a/drivers/video/bfin-lq035q1-fb.c +++ b/drivers/video/bfin-lq035q1-fb.c @@ -154,8 +154,10 @@ static int __devinit lq035q1_spidev_probe(struct spi_device *spi) ret = lq035q1_control(spi, LQ035_SHUT_CTL, LQ035_ON); ret |= lq035q1_control(spi, LQ035_DRIVER_OUTPUT_CTL, ctl->mode); - if (ret) + if (ret) { + kfree(ctl); return ret; + } spi_set_drvdata(spi, ctl);