[PATCH V2 14/19] irqchip: crossbar: set cb pointer to null in case of error
From: Sricharan R
Date: Thu Jun 12 2014 - 07:59:11 EST
If crossbar_of_init returns with a error, then set the cb pointer
to null.
Signed-off-by: Sricharan R <r.sricharan@xxxxxx>
---
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 cf0d79f..5f3e75a 100644
--- a/drivers/irqchip/irq-crossbar.c
+++ b/drivers/irqchip/irq-crossbar.c
@@ -259,6 +259,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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/