From: Markus Elfring <Markus.Elfring@web.de>
To: Felix Gu <ustc.gu@gmail.com>,
openipmi-developer@lists.sourceforge.net,
Corey Minyard <corey@minyard.net>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ipmi: Fix sysfs file leak on maintenance_mode creation failure
Date: Sat, 28 Mar 2026 19:40:11 +0100 [thread overview]
Message-ID: <cb817407-3832-4363-b1d9-9bf7e2b616ab@web.de> (raw)
In-Reply-To: <20260327-ipmi-v1-1-d4a4417140b2@gmail.com>
…
> +++ b/drivers/char/ipmi/ipmi_msghandler.c
> @@ -3734,6 +3734,7 @@ int ipmi_add_smi(struct module *owner,
> sysfs_attr_init(&intf->maintenance_mode_devattr.attr);
> rv = device_create_file(intf->si_dev, &intf->maintenance_mode_devattr);
> if (rv) {
> + device_remove_file(intf->si_dev, &intf->nr_msgs_devattr);
> device_remove_file(intf->si_dev, &intf->nr_users_devattr);
> goto out_err_bmc_reg;
> }
How do you think about to avoid a bit of duplicate source code here?
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst?h=v7.0-rc5#n526
Regards,
Markus
prev parent reply other threads:[~2026-03-28 18:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-27 13:40 Felix Gu
2026-03-28 18:40 ` Markus Elfring [this message]
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=cb817407-3832-4363-b1d9-9bf7e2b616ab@web.de \
--to=markus.elfring@web.de \
--cc=corey@minyard.net \
--cc=linux-kernel@vger.kernel.org \
--cc=openipmi-developer@lists.sourceforge.net \
--cc=ustc.gu@gmail.com \
/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
all inboxes | Powered by JetHome®