From patchwork Wed Sep 9 11:59:11 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Hunter X-Patchwork-Id: 46375 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n89BxXhh008594 for ; Wed, 9 Sep 2009 11:59:34 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753206AbZIIL73 (ORCPT ); Wed, 9 Sep 2009 07:59:29 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753179AbZIIL72 (ORCPT ); Wed, 9 Sep 2009 07:59:28 -0400 Received: from smtp.nokia.com ([192.100.105.134]:51620 "EHLO mgw-mx09.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753159AbZIIL71 (ORCPT ); Wed, 9 Sep 2009 07:59:27 -0400 Received: from esebh106.NOE.Nokia.com (esebh106.ntc.nokia.com [172.21.138.213]) by mgw-mx09.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id n89Bvu7R022900; Wed, 9 Sep 2009 06:58:15 -0500 Received: from esebh102.NOE.Nokia.com ([172.21.138.183]) by esebh106.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 9 Sep 2009 14:58:51 +0300 Received: from mgw-da01.ext.nokia.com ([147.243.128.24]) by esebh102.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Wed, 9 Sep 2009 14:58:50 +0300 Received: from [127.0.1.1] (esdhcp041173.research.nokia.com [172.21.41.173]) by mgw-da01.ext.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id n89BwgNX008752; Wed, 9 Sep 2009 14:58:42 +0300 From: Adrian Hunter To: Andrew Morton Cc: Jarkko Lavinen , Adrian Hunter , Madhusudhan Chikkature , Pierre Ossman , linux-omap Mailing List , linux-mmc Mailing List , Matt Fleming Date: Wed, 09 Sep 2009 14:59:11 +0300 Message-Id: <20090909115911.12833.58886.sendpatchset@ahunter-laptop> In-Reply-To: <20090909115633.12833.39619.sendpatchset@ahunter-laptop> References: <20090909115633.12833.39619.sendpatchset@ahunter-laptop> Subject: [PATCH V3 21/30] omap_hsmmc: fix NULL pointer dereference X-OriginalArrivalTime: 09 Sep 2009 11:58:50.0955 (UTC) FILETIME=[E563F1B0:01CA3144] Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org From bd81dee10c08ae9290c9a6170584549c15bc43d0 Mon Sep 17 00:00:00 2001 From: Jarkko Lavinen Date: Tue, 12 May 2009 19:46:14 +0300 Subject: [PATCH] omap_hsmmc: fix NULL pointer dereference Do not call 'mmc_omap_xfer_done()' if the request is already done. Signed-off-by: Jarkko Lavinen Signed-off-by: Adrian Hunter --- drivers/mmc/host/omap_hsmmc.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index d6bf65b..243ad97 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -670,7 +670,7 @@ static irqreturn_t mmc_omap_irq(int irq, void *dev_id) if (end_cmd || ((status & CC) && host->cmd)) mmc_omap_cmd_done(host, host->cmd); - if (end_trans || (status & TC)) + if ((end_trans || (status & TC)) && host->mrq) mmc_omap_xfer_done(host, data); return IRQ_HANDLED;