Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755503AbaFPL2H (ORCPT ); Mon, 16 Jun 2014 07:28:07 -0400 Received: from bear.ext.ti.com ([192.94.94.41]:47849 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755433AbaFPL0p (ORCPT ); Mon, 16 Jun 2014 07:26:45 -0400 From: Sricharan R To: , , , CC: , , , , , , , , Subject: [PATCH V3 11/16] irqchip: crossbar: set cb pointer to null in case of error Date: Mon, 16 Jun 2014 16:53:11 +0530 Message-ID: <1402917796-31574-12-git-send-email-r.sricharan@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1402917796-31574-1-git-send-email-r.sricharan@ti.com> References: <1402917796-31574-1-git-send-email-r.sricharan@ti.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If crossbar_of_init returns with a error, then set the cb pointer to null. Signed-off-by: Sricharan R --- drivers/irqchip/irq-crossbar.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/irqchip/irq-crossbar.c b/drivers/irqchip/irq-crossbar.c index 5bd7f3d..9b4c0f1 100644 --- a/drivers/irqchip/irq-crossbar.c +++ b/drivers/irqchip/irq-crossbar.c @@ -250,6 +250,8 @@ err_base: iounmap(cb->crossbar_base); err_cb: kfree(cb); + + cb = NULL; return ret; } -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/