From 44c507e3fdbcd1b0ccca252e0763fc4652b0bdbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Sv=C3=A4rd?= Date: Tue, 9 Feb 2021 16:37:40 +0100 Subject: arm_mhu_v2 driver bugfix rx_base is uninitialized when given as argument to iounmap(), fix the error handling. Change-Id: Ia828a2b3eee49dddf197012fd98200199de995fd --- mailbox/arm_mhu_v2.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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 @@ static int mhuv2_probe(struct amba_device *adev, 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; } -- cgit v1.2.1