arm_mhu_v2 driver bugfix
rx_base is uninitialized when given as argument to
iounmap(), fix the error handling.
Change-Id: Ia828a2b3eee49dddf197012fd98200199de995fd
diff --git a/mailbox/arm_mhu_v2.c b/mailbox/arm_mhu_v2.c
index 365715b..66ce216 100644
--- a/mailbox/arm_mhu_v2.c
+++ b/mailbox/arm_mhu_v2.c
@@ -190,15 +190,13 @@
tx_base = of_iomap((struct device_node *)np, 0);
if (!tx_base) {
dev_err(dev, "failed to map tx registers\n");
- iounmap(rx_base);
-
return -ENOMEM;
}
rx_base = of_iomap((struct device_node *)np, 1);
if (!rx_base) {
dev_err(dev, "failed to map rx registers\n");
-
+ iounmap(tx_base);
return -ENOMEM;
}