From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from smtp38.i.mail.ru ([94.100.177.98]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UVli6-0008Ri-2z for barebox@lists.infradead.org; Fri, 26 Apr 2013 16:41:26 +0000 From: Alexander Shiyan Date: Fri, 26 Apr 2013 20:41:09 +0400 Message-Id: <1366994474-21325-4-git-send-email-shc_work@mail.ru> In-Reply-To: <1366994474-21325-1-git-send-email-shc_work@mail.ru> References: <1366994474-21325-1-git-send-email-shc_work@mail.ru> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 4/9] MCI: atmel: Fix possible null pointer dereference To: barebox@lists.infradead.org Signed-off-by: Alexander Shiyan --- drivers/mci/atmel_mci.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/mci/atmel_mci.c b/drivers/mci/atmel_mci.c index f032403..c5fd306 100644 --- a/drivers/mci/atmel_mci.c +++ b/drivers/mci/atmel_mci.c @@ -262,11 +262,13 @@ static int atmci_read_response(struct atmel_mci *host, unsigned int stat) { struct mci_cmd *cmd = host->cmd; int i; - u32 *resp = (u32 *)cmd->response; + u32 *resp; if (!cmd) return 0; + resp = (u32 *)cmd->response; + if (stat & (ATMCI_RTOE | ATMCI_DTOE)) { dev_err(host->hw_dev, "command/data timeout\n"); return -ETIMEDOUT; -- 1.8.1.5 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox