Przeglądaj źródła

irqchip: crossbar: Set cb pointer to null in case of error

If crossbar_of_init returns with a error, then set the cb pointer
to null.

Signed-off-by: Sricharan R <r.sricharan@ti.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Link: https://lkml.kernel.org/r/1403766634-18543-12-git-send-email-r.sricharan@ti.com
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Sricharan R 11 lat temu
rodzic
commit
99e37d0ea6
1 zmienionych plików z 2 dodań i 0 usunięć
  1. 2 0
      drivers/irqchip/irq-crossbar.c

+ 2 - 0
drivers/irqchip/irq-crossbar.c

@@ -250,6 +250,8 @@ err_base:
 	iounmap(cb->crossbar_base);
 err_cb:
 	kfree(cb);
+
+	cb = NULL;
 	return ret;
 }