All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yang Yingliang <yangyingliang@huawei.com>
To: <linuxppc-dev@lists.ozlabs.org>
Cc: yangyingliang@huawei.com
Subject: [PATCH] macintosh/macio-adb: add missing iounmap() on error in macio_init()
Date: Thu, 5 Jan 2023 14:41:45 +0800	[thread overview]
Message-ID: <20230105064145.3879356-1-yangyingliang@huawei.com> (raw)

Add missing iounmap(), if request_irq() fails.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
 drivers/macintosh/macio-adb.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/macintosh/macio-adb.c b/drivers/macintosh/macio-adb.c
index 55a9f8c3a150..779f1268286e 100644
--- a/drivers/macintosh/macio-adb.c
+++ b/drivers/macintosh/macio-adb.c
@@ -123,6 +123,7 @@ int macio_init(void)
 	irq = irq_of_parse_and_map(adbs, 0);
 	of_node_put(adbs);
 	if (request_irq(irq, macio_adb_interrupt, 0, "ADB", (void *)0)) {
+		iounmap(adb);
 		printk(KERN_ERR "ADB: can't get irq %d\n", irq);
 		return -EAGAIN;
 	}
-- 
2.25.1


             reply	other threads:[~2023-01-05  6:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-05  6:41 Yang Yingliang [this message]
2023-10-27  9:59 ` [PATCH] macintosh/macio-adb: add missing iounmap() on error in macio_init() Michael Ellerman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230105064145.3879356-1-yangyingliang@huawei.com \
    --to=yangyingliang@huawei.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.