diff options
author | Jonny Svärd <jonny.svaerd@arm.com> | 2021-02-09 16:37:40 +0100 |
---|---|---|
committer | Jonny Svärd <jonny.svaerd@arm.com> | 2021-02-09 16:39:07 +0100 |
commit | 44c507e3fdbcd1b0ccca252e0763fc4652b0bdbe (patch) | |
tree | 65232e673984ee99c40737fc7690d903e535b8a4 /mailbox | |
parent | 7c24c770be3b3e25822cf7c45619ee20ed61c172 (diff) | |
download | ethos-u-linux-driver-stack-44c507e3fdbcd1b0ccca252e0763fc4652b0bdbe.tar.gz |
rx_base is uninitialized when given as argument to
iounmap(), fix the error handling.
Change-Id: Ia828a2b3eee49dddf197012fd98200199de995fd
Diffstat (limited to 'mailbox')
-rw-r--r-- | mailbox/arm_mhu_v2.c | 4 |
1 files changed, 1 insertions, 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; } |