From: Syed Nayyar Waris <syednwaris@gmail.com>
To: wbg@kernel.org
Cc: gregkh@linuxfoundation.org, rafael@kernel.org, dakr@kernel.org,
driver-core@lists.linux.dev, linux-kernel@vger.kernel.org,
syednwaris@gmail.com
Subject: [PATCH v2] isa: refactor code to remove nested blocks
Date: Thu, 2 Jul 2026 02:28:57 +0530 [thread overview]
Message-ID: <20260701205857.GA4113@syednwaris> (raw)
Remove nested blocks in isa_bus_init(). This will make the module
easy-to-understand and make the code clearer.
Previous discussion regarding this change can be found
at below link:
https://lore.kernel.org/all/20260504063518.515620-1-wbg@kernel.org/
Acked-by: William Breathitt Gray <wbg@kernel.org>
Suggested-by: William Breathitt Gray <wbg@kernel.org>
Signed-off-by: Syed Nayyar Waris <syednwaris@gmail.com>
---
Changes in v2:
- Make the patch description more comprehensive and thorough
in its explanation
---
drivers/base/isa.c | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/drivers/base/isa.c b/drivers/base/isa.c
index 5887e4211f80..4e9f68080f39 100644
--- a/drivers/base/isa.c
+++ b/drivers/base/isa.c
@@ -166,14 +166,16 @@ static int __init isa_bus_init(void)
int error;
error = bus_register(&isa_bus_type);
- if (!error) {
- isa_bus = root_device_register("isa");
- if (IS_ERR(isa_bus)) {
- error = PTR_ERR(isa_bus);
- bus_unregister(&isa_bus_type);
- }
+ if (error)
+ return error;
+
+ isa_bus = root_device_register("isa");
+ if (IS_ERR(isa_bus)) {
+ bus_unregister(&isa_bus_type);
+ return PTR_ERR(isa_bus);
}
- return error;
+
+ return 0;
}
postcore_initcall(isa_bus_init);
--
2.25.1
next reply other threads:[~2026-07-01 20:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-01 20:58 Syed Nayyar Waris [this message]
2026-07-02 3:16 ` [PATCH v2] isa: refactor code to remove nested blocks Randy Dunlap
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=20260701205857.GA4113@syednwaris \
--to=syednwaris@gmail.com \
--cc=dakr@kernel.org \
--cc=driver-core@lists.linux.dev \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=wbg@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox