From patchwork Thu Oct 27 14:18:37 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rusev X-Patchwork-Id: 122174 X-Patchwork-Delegate: galak@kernel.crashing.org Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [IPv6:::1]) by ozlabs.org (Postfix) with ESMTP id F155E100AA9 for ; Fri, 28 Oct 2011 02:55:16 +1100 (EST) X-Greylist: delayed 400 seconds by postgrey-1.34 at bilbo; Fri, 28 Oct 2011 01:25:20 EST Received: from mail.dev.rtsoft.ru (mail.dev.rtsoft.ru [213.79.90.226]) by ozlabs.org (Postfix) with SMTP id 4BE041007DA for ; Fri, 28 Oct 2011 01:25:19 +1100 (EST) Received: (qmail 1559 invoked from network); 27 Oct 2011 14:18:37 -0000 Received: from unknown (HELO ?192.168.11.225?) (192.168.1.70) by 0 with SMTP; 27 Oct 2011 14:18:37 -0000 Message-ID: <4EA9683D.8030100@dev.rtsoft.ru> Date: Thu, 27 Oct 2011 18:18:37 +0400 From: Rusev User-Agent: Thunderbird 1.5.0.8 (X11/20060911) MIME-Version: 1.0 To: benh@kernel.crashing.org, paulus@samba.org, galak@kernel.crashing.org, Shengzhou.Liu@freescale.com, Shaohui.Xie@freescale.com, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Fix for fsl_upm X-Mailman-Approved-At: Fri, 28 Oct 2011 02:55:09 +1100 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org patch is vs. 2.6.39, yet it applied to 3.1 Fix of UPM driver for Freescale PowerPC processors If Freescale LBC driver fails to initialise itself from device tree, then internal structure is freed only but not NULL-fied. As result functions fsl_lbc_find() after checking the structure is not NULL are trying to access device registers. Signed-off-by: Alexandre Rusev --- linux-2.6.39.old/arch/powerpc/sysdev/fsl_lbc.c 2011-10-27 03:17:28.000000000 +0400 +++ linux-2.6.39/arch/powerpc/sysdev/fsl_lbc.c 2011-10-27 05:06:44.000000000 +0400 @@ -322,6 +322,7 @@ static int __devinit fsl_lbc_ctrl_probe( err: iounmap(fsl_lbc_ctrl_dev->regs); kfree(fsl_lbc_ctrl_dev); + fsl_lbc_ctrl_dev = NULL; return ret; }